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

[ERROR] Exception in ASGI application #128

Open
hamzaziizzz opened this issue Mar 9, 2024 · 4 comments
Open

[ERROR] Exception in ASGI application #128

hamzaziizzz opened this issue Mar 9, 2024 · 4 comments

Comments

@hamzaziizzz
Copy link

hamzaziizzz commented Mar 9, 2024

@SthPhoenix

2024-03-09 09:54:29 Traceback (most recent call last):
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
2024-03-09 09:54:29     result = await app(  # type: ignore[func-returns-value]
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
2024-03-09 09:54:29     return await self.app(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in __call__
2024-03-09 09:54:29     await super().__call__(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in __call__
2024-03-09 09:54:29     await self.middleware_stack(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in __call__
2024-03-09 09:54:29     raise exc
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in __call__
2024-03-09 09:54:29     await self.app(scope, receive, _send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
2024-03-09 09:54:29     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-03-09 09:54:29     raise exc
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-03-09 09:54:29     await app(scope, receive, sender)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in __call__
2024-03-09 09:54:29     await self.middleware_stack(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
2024-03-09 09:54:29     await route.handle(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
2024-03-09 09:54:29     await self.app(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
2024-03-09 09:54:29     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-03-09 09:54:29     raise exc
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-03-09 09:54:29     await app(scope, receive, sender)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 74, in app
2024-03-09 09:54:29     response = await func(request)
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app
2024-03-09 09:54:29     raw_response = await run_endpoint_function(
2024-03-09 09:54:29   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 191, in run_endpoint_function
2024-03-09 09:54:29     return await dependant.call(**values)
2024-03-09 09:54:29   File "/app/app.py", line 92, in extract
2024-03-09 09:54:29     output = await processing.extract(images, max_size=data.max_size, return_face_data=data.return_face_data,
2024-03-09 09:54:29 AttributeError: 'NoneType' object has no attribute 'extract'

I'm getting this error on NVIDIA RTX 4050

@ZayneHuang
Copy link

Hi @hamzaziizzz ,

I met the same error on NVIDIA RTX 2080Ti as well. Have you solved this?
Thanks!

@ZayneHuang
Copy link

Hi @hamzaziizzz ,

I think I have fixed this error in my situation.

I failed to download the correct weight files and the auto re-download also failed due to bad network connection. This led to errors in inference.

Maybe @SthPhoenix could consider on checking the success state of loading the weight file?

@SthPhoenix
Copy link
Owner

Looks like various errors during processing module initialization may lead to silent fail, followed by this exception, I'll try to add more checks at startup to make module fail as early as possible to leave actual stack trace in console.

@SthPhoenix
Copy link
Owner

Looks like various errors during processing module initialization may lead to silent fail, followed by this exception, I'll try to add more checks at startup to make module fail as early as possible to leave actual stack trace in console.

A have committed small fix that should exit app if processing module failed to load

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

3 participants