[Biopython-dev] [Bug 2734] db.load problem with postgresql and psycopg2

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat Jan 17 10:09:21 UTC 2009


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





------- Comment #3 from cymon.cox at gmail.com  2009-01-17 05:09 EST -------
Hi Stephen,

2009/1/16  <bugzilla-daemon at portal.open-bio.org>:
> http://bugzilla.open-bio.org/show_bug.cgi?id=2734
>
> ------- Comment #2 from stephen at blackrim.net  2009-01-16 14:12 EST -------
> Hi Peter,
> Thanks for the quick reply. I will try to answer everything here. So I just
> reran the BioSQL tests and I get
> test_BioSQL ... ok
> test_BioSQL_SeqIO ... ok
>
> so seems like everything there is fine (and I did configure the test for
> postgres with the psycopg2 driver). I am downloading from the NCBI ftp and it
> happens not only with all the files but also with the example on the biopython
> biosql wiki page. Specifically with this example:
> from Bio import Entrez
> from Bio import SeqIO
> from BioSQL import BioSeqDatabase
> server = BioSeqDatabase.open_database(driver="psycopg2", ...)
> db = server["plants"]
> handle = Entrez.efetch(db="nuccore", id="6273291,6273290,6273289",
> rettype="genbank")
> db.load(SeqIO.parse(handle, "genbank"))
> server.adaptor.commit()

This code works form me:
[cymon at chara ~]$ python
Python 2.5.2 (r252:60911, Jul 24 2008, 17:11:36)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import Entrez
>>> from Bio import SeqIO
>>> from BioSQL import BioSeqDatabase
>>> server = BioSeqDatabase.open_database(driver="psycopg2", db = "biosql_test")
>>> db = server.new_database("blah", description="Just for testing")
>>> handle = Entrez.efetch(db="nuccore", id="6273291,6273290,6273289", rettype="genbank")
>>> server.adaptor.commit()
>>>

What versions of biopython and the BioSQL schema are you using?

Cymon


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