openvax / pyensembl

Python interface to access reference genome features (such as genes, transcripts, and exons) from Ensembl
Apache License 2.0
374 stars 65 forks source link

TypeError: unhashable type: 'Database' #85

Closed alec-djinn closed 9 years ago

alec-djinn commented 9 years ago

I have just upgraded to pyensembl-0.6.1 and I got a mysterious error...

Python 3.4.3 (default, Mar 26 2015, 14:39:22) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from pyensembl import * genome = EnsemblRelease(75, auto_download=True) genes = genome.gene_names_at_locus(contig=4, position=10000) Traceback (most recent call last): File "", line 1, in File "/Users/amarcozzi/Homebrew/lib/python3.4/site-packages/pyensembl/ensembl_release.py", line 275, in gene_names_at_locus strand=strand) File "/Users/amarcozzi/Homebrew/lib/python3.4/site-packages/pyensembl/database.py", line 341, in distinct_column_values_at_locus sorted=True) File "/Users/amarcozzi/Homebrew/lib/python3.4/site-packages/pyensembl/database.py", line 265, in column_values_at_locus if not self.column_exists(feature, column_name): File "/Users/amarcozzi/Homebrew/lib/python3.4/site-packages/pyensembl/common.py", line 30, in wrapped_fn if key not in memoized_values: TypeError: unhashable type: 'Database'

any clue?

iskandr commented 9 years ago

I don't think this is a problem with the latest version 0.6.3, can you try upgrading through pip?

If that fixes it, sorry there was an outdated version PyPI, we need to automate our release process (talking about this with @tavinathanson)

alec-djinn commented 9 years ago

Yes it works now!