eftsung / pygr

Automatically exported from code.google.com/p/pygr
0 stars 0 forks source link

define informative __repr__ for BlastDBbase, BlastDB, and PrefixUnionDict; better KeyError report #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
replaces KeyError report:

  File "/Users/t/dev/pygr/pygr/seqdb.py", line 777, in get_real_id
    raise KeyError # FOUND NO MAPPING, SO RAISE EXCEPTION
KeyError

with more informative:

KeyError: "no key 'x' in database <BlastDB 'dnaseq'>"

and

KeyError: "no key 'db2.x' in <pygr.seqdb.PrefixUnionDict object at 0xd95b90>"

Original issue reported on code.google.com by the.good...@gmail.com on 16 Aug 2008 at 10:41

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by the.good...@gmail.com on 17 Aug 2008 at 1:03

GoogleCodeExporter commented 8 years ago

Original comment by the.good...@gmail.com on 1 Sep 2008 at 5:57

GoogleCodeExporter commented 8 years ago

Original comment by mare...@gmail.com on 21 Feb 2009 at 2:03

GoogleCodeExporter commented 8 years ago

Original comment by cjlee...@gmail.com on 4 Mar 2009 at 11:22

GoogleCodeExporter commented 8 years ago

Original comment by mare...@gmail.com on 12 Mar 2009 at 8:27

GoogleCodeExporter commented 8 years ago
To clarify: the fix has been verified.

Original comment by mare...@gmail.com on 12 Mar 2009 at 11:52