-
-
Notifications
You must be signed in to change notification settings - Fork 494
[BUG] all async test routers failed with TypeError: 'list' object is not callable #1440
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
Comments
I tried to revert |
@tim-hub could you show full stack trace ? |
Thanks @vitalik Error
Traceback (most recent call last):
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/asgiref/sync.py", line 254, in __call__
return call_result.result()
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/asgiref/sync.py", line 331, in main_wrap
result = await self.awaitable(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Development/ti/core/tests/api/test_trade_router.py", line 258, in test_fetch_trade
response: NinjaResponse = await self.client.get("")
^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Development/ti/core/tests/api/test_trade_router.py", line 190, in _call
return NinjaResponse(await func(request, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/operation.py", line 493, in _async_view
return await cast(AsyncOperation, operation).run(request, *a, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/operation.py", line 347, in run
error = await self._run_checks(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/operation.py", line 364, in _run_checks
error = await self._run_authentication(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/operation.py", line 394, in _run_authentication
return self.api.on_exception(request, exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/main.py", line 520, in on_exception
return handler(request, exc)
^^^^^^^^^^^^^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/errors.py", line 129, in _default_exception
raise exc # let django deal with it
^^^^^^^^^
File "~/Library/Caches/pypoetry/virtualenvs/tradeinsight.info-312/lib/python3.12/site-packages/ninja/operation.py", line 392, in _run_authentication
result = callback(request)
^^^^^^^^^^^^^^^^^
TypeError: 'list' object is not callable I think the error is raised from |
Any ideas for this issue, @vitalik If there is no straight forward causes, I will just give up and stay on an old version for now. |
Describe the bug
all async test routers failed with
Everything was fine on 1.3.0 + 5.2, however, when I updated to 1.4.1 all tests failed.
Versions (please complete the following information):
Test case:
It was fine on 1.3.0 but failed on 1.4.1 and 1.4.0 with
TypeError: 'list' object is not callable
Is it a bug or did I not use the right way to write my tests?
Any ideas? thanks. :)
The text was updated successfully, but these errors were encountered: