-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading nexus files from strings > 220bytes fails on windows with Python 3 #258
Comments
@davidhwyllie Can you paste a traceback of the actual error? |
Also which version of Python 3? |
Hi at the moment I am having trouble producing a unit test to reproduce this. It isn't as simple as the 'strings longer than 220 chars' described above. When I have a reproducible, failing example I will write further. In the meantime, I have attached a unit test which passes which loads small and large files from strings and files on windows using unpatched ete3. It produces a deprecation warning related to reading files in 'rU' mode, but this is a python 3 issue not a windows one. |
Thanks David,
can you implement those unitests on your github branch and the Pull
Request?
It is easy to review and comment that way.
…On 4 March 2017 at 22:31, David Wyllie ***@***.***> wrote:
Hi
at the moment I am having trouble producing a unit test to reproduce this.
It isn't as simple as the 'strings longer than 220 chars' described above.
When I have a reproducible, failing example I will write further.
In the meantime, I have attached a unit test which passes which loads
small and large files from strings and files on windows using unpatched
ete3.
It produces a deprecation warning related to reading files in 'rU' mode,
but this is a python 3 issue not a windows one.
ete3_issue258.zip
<https://github.com/etetoolkit/ete/files/818947/ete3_issue258.zip>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#258 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJ_Sk7j3RuDd_S7T-v0QmLUyY4hmFRJks5ridgsgaJpZM4MEfEV>
.
|
Hi Thanks. Sorry for the delay in replying. This issue can be reproduced on the following system using the latest release of ete3. System details How to reproduce
How to fix Modify the read_newick function as shown
Post fix:
I don't think I have permission to create a PR (sorry, I've not done this before) but I have committed my local change to a copy of your repository [here] (https://github.com/davidhwyllie/ETE3_ISSUE258) If you would like me to do something different, please let me know. |
Thank you for your assistance. I will submit a pull request as advised. Unit test and commit fixing issue |
Resolve long tree string problem on Windows #258
Hi
A minor issue; in the Newick parser read_newick function (parsers/newick.py, line 220) called when reading newick files, as described here:
http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html#reading-newick-trees
does a kind of 'duck typing' approach to deciding whether the string passed is a file path or a newick string.
On windows this fails if the string is >220bytes because os.stat returns an error from the operating system.
I guess there's various ways of dealing with this, & I've attached a modified module below which implements one such.
Best wishes
David
The text was updated successfully, but these errors were encountered: