[BioPython] Loading SwissProt to BioSQL

Peter biopython at maubp.freeserve.co.uk
Thu Oct 25 17:22:46 UTC 2007


Jonathan Boulais wrote:
>> My guess is you shouldn't call your script "Biosql.py", call it 
>> "Biosql_test.py" or something.  Python thinks the line "from BioSQL 
>> import BioSeqDatabase" means importing from the script itself because 
>> that is also called BioSQL.
> 
> Peter you were right about the name of the file. Nice call and thank you !

Great - I wasn't sure if the case would matter or not.

> But I still get the same error as before when I'm running it. 
> ...

I've not used BioSQL myself (yet), but looking at the code you posted 
earlier, you setup the connection like this:

from BioSQL import BioSeqDatabase
server = BioSeqDatabase.open_database(driver="MySQLdb", user="", 
passwd="", host="localhost", db="bioseqdb")

I think the driver="MySQLdb" is fine, but don't you need a database 
username (and perhaps a password)?

Peter




More information about the Biopython mailing list