[Biopython-dev] PDB Parser error

Peter biopython at maubp.freeserve.co.uk
Tue Mar 17 16:01:25 UTC 2009


On Tue, Mar 17, 2009 at 3:30 PM, Rodrigo faccioli
<rodrigo_faccioli at uol.com.br> wrote:
> I built a relational database in PostgreSQL. This database stores some
> informations form PDB file. These informations are about its sequence, atoms
> and sbonds. Now, I'm building a parser for this my database which I want to
> load it in a biopython PDB parser structure. The idea is  keep on whole my
> souce-code  based in biopython PDB parser, because will be necessary to do
> some operations with these informations.
>
> So, I study the Bio.PDB directory and I read in the PDBPaerser.py file, its
> _parse_coordinates method where there is some methods about initialization
> structure. I run them in my code. However, is showing the message below.
> Traceback (most recent call last):
>  File "src/testefcfrpPDB.py", line 32, in <module>
> ...
>  File
> "/usr/lib/python2.5/site-packages/biopython-1.49-py2.5-linux-i686.egg/Bio/PDB/Entity.py",
> line 96, in has_id
>    return self.child_dict.has_key(id)
> TypeError: list objects are unhashable
>
> This post is my first post in biopython developer's list and I don't know
> what is the its process to send a code.

Its hard to say without seeing your full code (and even then, without
the database it would be difficult to reproduce it).  As you have a
TypeError, I suspect you have something as the wrong datatype - maybe
a list that should be a string or something.

If you want to share the full file testefcfrpPDB.py you could post it
on http://pastebin.com/ or something (do you have your own website?).

Peter




More information about the Biopython-dev mailing list