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

POST request different behaviour #1

Open
BugsBunny33 opened this issue Apr 9, 2021 · 1 comment
Open

POST request different behaviour #1

BugsBunny33 opened this issue Apr 9, 2021 · 1 comment

Comments

@BugsBunny33
Copy link

POST /terms/similarity/

Stack Trace:
INFO: 172.17.0.1:54882 - "GET /terms/similarity HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55000 - "GET /term/HP%3A0000961 HTTP/1.1" 200 OK
INFO: 172.17.0.1:55332 - "POST /terms/similarity/ HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55348 - "POST /terms/similarity/ HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55388 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:55400 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:55490 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:56422 - "GET /term/HP%3A0001635/neighbours?verbose=false HTTP/1.1" 200 OK
INFO: 172.17.0.1:56422 - "GET /term/HP%3A0001635?verbose=false HTTP/1.1" 200 OK
INFO: 172.17.0.1:56432 - "POST /terms/similarity/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.6/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/fastapi/applications.py", line 181, in call
await super().call(scope, receive, send) # pragma: no cover
File "/usr/local/lib/python3.6/site-packages/starlette/applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py", line 181, in call
raise exc from None
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py", line 159, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/cors.py", line 78, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/exceptions.py", line 82, in call
raise exc from None
File "/usr/local/lib/python3.6/site-packages/starlette/exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 566, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/usr/local/lib/python3.6/site-packages/fastapi/routing.py", line 183, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/usr/local/lib/python3.6/site-packages/fastapi/routing.py", line 133, in run_endpoint_function
return await dependant.call(**values)
File "/usr/local/lib/python3.6/site-packages/pyhpoapi/routers/terms.py", line 377, in batch_similarity
res['error'] = ex.headers['X-TermNotFound']
TypeError: 'NoneType' object is not subscriptable

@jonasmarcello
Copy link
Contributor

I hope the issue is fixed. Please test the docker image pyhpoapi:1.2.2-rc1 in the nexus repo. If it works, i'll publish the fixed version

jonasmarcello added a commit that referenced this issue May 30, 2021
…-similarity

Issue-#1: Don't break with invalid HPO terms in batch-POST similarity request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants