Repository navigation
Conversation
Removing the call to `keys()` on line 999 caused `prev_partitions` to be a shallow copy of `self.charpartitions` instead of a previous copy of the keys. In the next line, `self.charpartitions` is modified and therefore so is `prev_partitions`. So, the requirement in the list comprehension `n not in prev_partitions` is impossible to meet and the `NexusError` will always be raised. I encountered the raised error when trying to read a nexus file.
|
That does look sensible.... do you have a specific example of the error we can turn into a unit test? |
|
I apologize for the poor commit message -- using github's interface, I forgot that I was writing a commit message and treated it as a comment field. I believe all nexus files with a I made a minimal nexus file that reproduces my experience. Perhaps this is a good start for writing the unit test. I'm using BioPython version 1.57 in the code example below, not the latest version from github (version 1.59+), so the line numbers are slightly off. I fear breaking something if I try to install 1.59+ when 1.57 is already installed... but I've looked at the code and the same bug is in both versions. Edit1 |
|
P.S. Those HTTP Error 500 errors from the TogoWS tests are harmless - the DDBJ in Japan are/were upgrading their super computer and as a result some of the DDBJ resources have been offline. |
|
Hi Peter, 6 years later it's nice to hear from you :) I hereby give my explicit permission to license my contributions under the Biopython License Agreement AND the BSD 3-Clause License. Thanks for asking! |
|
Thank you! |
Original authors Frank Kauff and Cymon J. Cox and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - @Amrithasuresh biopython#1575 - @biojerm biopython#1847 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Chris Warth (@cswarth) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Connor McCoy (@cmccoy) biopython#898 (comment) - Cymon J. Cox (@cymon) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Frank Kauff (CVS username fkauff, on GitHub as @frankkl) biopython#2246 (comment) - Iddo Friedberg (@idoerg) biopython#898 (comment) - Joe Cora (@JoeCora) biopython#898 (comment) - Kamil Slowikowski (@slowkow) biopython#30 (comment) - Lenna Peterson (@lennax) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment) - Sergio Valqui (@svalqui) biopython#1749 - Sourav Singh (@souravsingh) biopython#957 - Tiago Antao (@tiagoantao) biopython#898 (comment) - Travis Wrightsman (@twrightsman) biopython#898 (comment) - @unify N/A - Vincent Davis (@vincentdavis) biopython#898 (comment) - Wayne Decatur (@fomightez) biopython#898 (comment) - Wibowo Arindrarto (@bow) biopython#898 (comment)
Original authors Frank Kauff and Cymon J. Cox and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - @Amrithasuresh #1575 - @biojerm #1847 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Chris Rands (@chris-rands) #1301 - Chris Warth (@cswarth) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Connor McCoy (@cmccoy) #898 (comment) - Cymon J. Cox (@cymon) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Frank Kauff (CVS username fkauff, on GitHub as @frankkl) #2246 (comment) - Iddo Friedberg (@idoerg) #898 (comment) - Joe Cora (@JoeCora) #898 (comment) - Kamil Slowikowski (@slowkow) #30 (comment) - Lenna Peterson (@lennax) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Nick Negretti (@nimne) #1768 (comment) - Peter Cock (@peterjc) #898 (comment) - Sergei Lebedev (@superbobry) #898 (comment) - Sergio Valqui (@svalqui) #1749 - Sourav Singh (@souravsingh) #957 - Tiago Antao (@tiagoantao) #898 (comment) - Travis Wrightsman (@twrightsman) #898 (comment) - @unify N/A - Vincent Davis (@vincentdavis) #898 (comment) - Wayne Decatur (@fomightez) #898 (comment) - Wibowo Arindrarto (@bow) #898 (comment)
Commit bdf94b3 deleted a lot of calls to
.keys(). Some of those calls should not be deleted. I spotted one of them.Removing the call to
keys()on line 999 causedprev_partitionsto be a shallow copy ofself.charpartitionsinstead of a previous copy of the keys. In the next line,self.charpartitionsis modified and therefore so isprev_partitions. So, the requirement in the list comprehensionn not in prev_partitionsis impossible to meet and theNexusErrorwill always be raised. I encountered the raised error when trying to read a nexus file.