commonsense/conceptnet5 — Issue #3: JSON API crashes with TypeError
Author: rspeer
Created: 2011-10-23 20:30:45+00:00
State: open

Here's what I get at http://anemone.media.mit.edu:5000/concept/en/coffee/:

```
Traceback (most recent call last):
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1262, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/conceptnet5/env/lib/python2.6/site-packages/flask/app.py", line 1248, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/srv/conceptnet5/conceptnet5/api.py", line 39, in get_data
json[label] = f(uri)
File "/srv/conceptnet5/conceptnet5/api.py", line 189, in get_normalized_of
json[-1]['url'] = root_url + json[-1]['uri']
TypeError: 'NoneType' object is unsubscriptable
```