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

AttributeError: 'NoneType' object has no attribute 'id' delete_account #2

Open
fermenen opened this issue Jan 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@fermenen
Copy link
Owner

fermenen commented Jan 1, 2023

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 86, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 142, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 208, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 325, in _sentry_patched_asgi_app return await middleware(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/asgi.py", line 139, in _run_asgi3 return await self._run_app(scope, lambda: self.app(scope, receive, send)) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/asgi.py", line 188, in _run_app raise exc from None File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/asgi.py", line 183, in _run_app return await callback() File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 130, in _create_span_call return await old_call(app, scope, new_receive, new_send, **kwargs) File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 130, in _create_span_call return await old_call(app, scope, new_receive, new_send, **kwargs) File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 25, in __call__ response = await self.dispatch_func(request, self.call_next) File "/usr/local/lib/python3.9/site-packages/supertokens_python/framework/fastapi/fastapi_middleware.py", line 53, in dispatch response = await call_next(request) File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 45, in call_next task.result() File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 38, in coro await self.app(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 223, in _sentry_exceptionmiddleware_call await old_call(self, scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 223, in _sentry_exceptionmiddleware_call await old_call(self, scope, receive, send) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/starlette.py", line 130, in _create_span_call return await old_call(app, scope, new_receive, new_send, **kwargs) File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__ raise exc from None File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 580, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 241, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 52, in app response = await func(request) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/fastapi.py", line 107, in _sentry_app return await old_app(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 161, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 40, in run_in_threadpool return await loop.run_in_executor(None, func, *args) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/code/./sql_app/routers/admin.py", line 53, in delete_user_lupax_supertokens return crud.delete_account(db, supertokens_user_id=item.user_id) File "/code/./sql_app/crud.py", line 224, in delete_account raise err File "/code/./sql_app/crud.py", line 219, in delete_account models.Notifications.user_id == user_lupax.id).delete() AttributeError: 'NoneType' object has no attribute 'id'

@fermenen fermenen added the bug Something isn't working label Jan 1, 2023
@fermenen fermenen self-assigned this Jan 1, 2023
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