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

/topic/sizes fails with exception #12

Open
behrica opened this issue Jun 10, 2021 · 5 comments
Open

/topic/sizes fails with exception #12

behrica opened this issue Jun 10, 2021 · 5 comments

Comments

@behrica
Copy link

behrica commented Jun 10, 2021

Calling /topc/sizes with my model gives exception:

72.17.0.1:40920 - "GET /openapi.json HTTP/1.1" 200
172.17.0.1:40922 - "GET /docs HTTP/1.1" 200
172.17.0.1:40922 - "GET /openapi.json HTTP/1.1" 200
172.17.0.1:40924 - "GET /topics/sizes HTTP/1.1" 500
[2021-06-10 10:13:27 +0000] [29] [ERROR] Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 390, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.7/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.7/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 148, in app
    dependant=dependant, values=values, is_coroutine=is_coroutine
  File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 101, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/main.py", line 107, in get_topic_sizes
    topic_sizes, topic_nums = top2vec.get_topic_sizes()
  File "/usr/local/lib/python3.7/site-packages/top2vec/Top2Vec.py", line 384, in get_topic_sizes
    return np.array(self.topic_sizes.values), np.array(self.topic_sizes.index)
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
    if self._info_axis._can_hold_identifiers_and_holds_name(name):
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
    if self._info_axis._can_hold_identifiers_and_holds_name(name):
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
    if self._info_axis._can_hold_identifiers_and_holds_name(name):
  [Previous line repeated 480 more times]
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 493, in _info_axis
    return getattr(self, self._info_axis_name)
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5270, in __getattr__
    return object.__getattribute__(self, name)
  File "pandas/_libs/properties.pyx", line 63, in pandas._libs.properties.AxisProperty.__get__
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5270, in __getattr__
    return object.__getattribute__(self, name)
RecursionError: maximum recursion depth exceeded while calling a Python object
@behrica
Copy link
Author

behrica commented Jun 10, 2021

The same model files works in python,

calling topic_sizes, topic_nums = top2vec.get_topic_sizes()

@behrica
Copy link
Author

behrica commented Jun 10, 2021

My last comment is not correct,
In the Docker container "ddangelov/restful-top2vec" I get the same error message inside a python command line then above with my model file.

@behrica
Copy link
Author

behrica commented Jun 10, 2021

Nevertheless it does work in the virtual environment I use on my local PC.

So the error depends on which libraries are installed.

If you share here the Dockerfile, I could maybe investigate further.

@behrica
Copy link
Author

behrica commented Jun 10, 2021

I found the Dockerfile..

@behrica
Copy link
Author

behrica commented Jun 10, 2021

I applied locally all pending PRs which upgrade the versions, and that fixed the issue.

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

1 participant