Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error when no query string is present #7

Open
jotegui opened this issue Jun 13, 2016 · 0 comments
Open

Unhandled error when no query string is present #7

jotegui opened this issue Jun 13, 2016 · 0 comments

Comments

@jotegui
Copy link
Member

jotegui commented Jun 13, 2016

If the query object doesn't have a q element, it raises an unhandled AttributeError claiming there is no q object to parse. (tagged as Search but probably occurs the same with Download)

http://api-module.vertnet-portal.appspot.com/api/v1/search?q={%22l%22:%2020}

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~vertnet-portal/api-module:v1.393012557775132470/Search/SearchAPI.py", line 105, in get
    result = vnsearch.query(q, limit, 'dwc', sort=sort, curs=curs)
  File "/base/data/home/apps/s~vertnet-portal/api-module:v1.393012557775132470/Search/search.py", line 45, in query
    if q.startswith('id:'):
AttributeError: 'NoneType' object has no attribute 'startswith'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant