[Biopython-dev] [Bug 2390] Error importing Swiss Prot in BioSQL

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Nov 1 09:24:21 UTC 2007


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





------- Comment #7 from biopython-bugzilla at maubp.freeserve.co.uk  2007-11-01 05:24 EST -------
Created an attachment (id=801)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=801&action=view)
Untested patch to BioSQL/DBUtils.py

Based on a little google searching, this is my completely untested educated
guess for how to fix the cursor problem in BioSQL/DBUtils.py with the relevant
changed bit of code below:

class Mysql_dbutils(Generic_dbutils):
    def last_id(self, cursor, table):
        try :
            #This worked on older versions of MySQL
            return cursor.insert_id()
        except AttributeError:
            #See bug 2390.
            #Google suggests this is the new way:
            return cursor.lastrowid

If you feel brave and don't know how to work with patches, just back the
original file and then edit the class Mysql_dbutils to look like the above.


-- 
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