davidalber/Geneagrapher — Issue #17: Unpleasing error message for bad ID 2
Author: davidalber
Created: 2012-01-14 05:24:07+00:00
State: open
Labels: Bug

This was reported by @ChaoJenWong.

Similar to #16, but with a twist. For IDs that are very long the error response is not helpful. Doing `ggrapher -v 999999999999999999999` returns:

```
Grabbing record #999999999999999999999...Traceback (most recent call last):
File "/Users/David/tmp/ggrapher/bin/ggrapher", line 9, in
load_entry_point('geneagrapher==1.0c2', 'console_scripts', 'ggrapher')()
File "/Users/David/fun/Geneagrapher/src/geneagrapher/geneagrapher.py", line 148, in ggrapher
ggrapher.build_graph()
File "/Users/David/fun/Geneagrapher/src/geneagrapher/geneagrapher.py", line 129, in build_graph
self.build_graph_complete(record_grabber, filename=self.cache_file)
File "/Users/David/fun/Geneagrapher/src/geneagrapher/geneagrapher.py", line 110, in build_graph_complete
descendant_queue=descendant_queue)
File "/Users/David/fun/Geneagrapher/src/geneagrapher/geneagrapher.py", line 84, in build_graph_portion
record = grabber.get_record(id)
File "/Users/David/fun/Geneagrapher/src/geneagrapher/cache_grabber.py", line 37, in get_record
record = self.grabber.get_record(id)
File "/Users/David/fun/Geneagrapher/src/geneagrapher/grabber.py", line 31, in get_record
return get_record_from_tree(soup, id)
File "/Users/David/fun/Geneagrapher/src/geneagrapher/grabber.py", line 37, in get_record_from_tree
if not has_record(soup):
File "/Users/David/fun/Geneagrapher/src/geneagrapher/grabber.py", line 54, in has_record
return not soup.firstText().text == u"You have specified an ID that does \
AttributeError: 'NoneType' object has no attribute 'text'
```