[Biopython-dev] [Bug 2883] New: Errors after unpickling of 1.49 seqrecords

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jul 22 15:14:46 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2883

           Summary: Errors after unpickling of 1.49 seqrecords
           Product: Biopython
           Version: 1.51b
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: andrea at biodec.com


I've the same error also with biopython 1.50b 
I've the same errors either with python2.4 and python2.5

PROBLEM:
I've for testing purposes some cPickled seqrecords that i prepared with
biopython-1.49.

The unpickling doesn't produce any error at all, but if i try to:
  1) print the unpickled seqrecord
  2) use the unpickled seqrecord
i get errors.

1) =========================================================================
>>> print seqr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/lib/python2.5/site-packages/biopython-1.51b-py2.5-linux-x86_64.egg/Bio/SeqRecord.py",
line 501, in __str__
    if self.letter_annotations :
  File
"/usr/lib/python2.5/site-packages/biopython-1.51b-py2.5-linux-x86_64.egg/Bio/SeqRecord.py",
line 170, in <lambda>
    fget=lambda self : self._per_letter_annotations,
AttributeError: 'SeqRecord' object has no attribute '_per_letter_annotations'

### This problem maybe is related to the one of the bug #2838
===============================================================================

2)=============================================================================
>>> seqr.seq
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/lib/python2.5/site-packages/biopython-1.51b-py2.5-linux-x86_64.egg/Bio/SeqRecord.py",
line 538, in __repr__
    % tuple(map(repr, (self.seq, self.id, self.name,
  File
"/usr/lib/python2.5/site-packages/biopython-1.51b-py2.5-linux-x86_64.egg/Bio/SeqRecord.py",
line 233, in <lambda>
    seq = property(fget=lambda self : self._seq,
AttributeError: 'SeqRecord' object has no attribute '_seq'
===============================================================================

According to me old seqrecords didn't have any "_per_letter_annotations"
or any "_seq" in SeqRecord class/instances.

Maybe i've to split the two errors in two different bugs but i prefer
to keep together because are related to the same main problem of 
"unpickling an old seqrecord" (or maybe is not a problem and i haven't 
to try to unpickle old seqrecord instance with new biopython versions)

I didn't try the CVS code because i didn't find any related error in
bugzilla.open-bio.org.

I've added a dump of a seqrecord generated with biopython-1.49

Thanks
Andrea


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list