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

Bug for signed source-target search #31

Open
kkaris opened this issue May 21, 2024 · 0 comments
Open

Bug for signed source-target search #31

kkaris opened this issue May 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kkaris
Copy link
Contributor

kkaris commented May 21, 2024

Query:

  • source: PF-00477736
  • target: DNM1L
  • sign: + or -

Error log:

[2024-05-21 17:49:20 +0000] [7] [ERROR] Exception in ASGI application
Traceback (most recent call last):
  File "/sw/indra_network_search/indra_network_search/result_handler.py", line 344, in _check_source_and_target
    assert isinstance(self.source, Node)
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 290, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 91, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 146, in simple_response
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 241, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 169, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/usr/local/lib/python3.8/dist-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "/sw/indra_network_search/indra_network_search/rest_api.py", line 246, in query
    results = network_search_api.handle_query(rest_query=search_query)
  File "/sw/indra_network_search/indra_network_search/search_api.py", line 91, in handle_query
    result_managers[alg_name] = self.shared_parents(query)
  File "/sw/indra_network_search/indra_network_search/search_api.py", line 323, in shared_parents
    return OntologyResultManager(path_generator=path_gen, graph=graph, **oq.result_options())
  File "/sw/indra_network_search/indra_network_search/result_handler.py", line 776, in __init__
    super().__init__(
  File "/sw/indra_network_search/indra_network_search/result_handler.py", line 310, in __init__
    self._check_source_target()
  File "/sw/indra_network_search/indra_network_search/result_handler.py", line 787, in _check_source_target
    self._check_source_and_target()
  File "/sw/indra_network_search/indra_network_search/result_handler.py", line 347, in _check_source_and_target
    raise ValueError(
ValueError: Both source and target must be provided and be instance of Node for shared_parents

@kkaris kkaris added the bug Something isn't working label May 21, 2024
@kkaris kkaris self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant