-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugОшибка в API или некорректный ответОшибка в API или некорректный ответsection/inventoryСклад\инвентарь\оборудованиеСклад\инвентарь\оборудованиеsource/neomobileПроблема или задача, относящаяся к приложению NeoMobileПроблема или задача, относящаяся к приложению NeoMobile
Description
Ошибка при получении оборудования
Traceback (most recent call last):
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
raise exc
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 176, in __call__
with recv_stream, send_stream, collapse_excgroups():
File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
raise exc
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 178, in __call__
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/main.py", line 90, in check_api_key
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 156, in call_next
raise app_exc
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
await route.handle(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noc/smartlinkAPI/routers/neomobile.py", line 153, in neomobile_api_get_inventory
'data': [
^
File "/home/noc/smartlinkAPI/routers/neomobile.py", line 163, in <listcomp>
'name': [
^
IndexError: list index out of range
Metadata
Metadata
Assignees
Labels
bugОшибка в API или некорректный ответОшибка в API или некорректный ответsection/inventoryСклад\инвентарь\оборудованиеСклад\инвентарь\оборудованиеsource/neomobileПроблема или задача, относящаяся к приложению NeoMobileПроблема или задача, относящаяся к приложению NeoMobile