sanic-auth icon indicating copy to clipboard operation
sanic-auth copied to clipboard

AttributeError: 'list' object has no attribute 'ctx'

Open beliboba opened this issue 3 years ago • 1 comments

[2022-04-25 15:58:52 +0300] [8448] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:5000/login' Traceback (most recent call last): File "handle_request", line 83, in handle_request ) File "C:\Users\Beliboba\PycharmProjects\beliboba\main.py", line 64, in login auth.login_user(request, user=user) File "C:\Users\Beliboba\PycharmProjects\beliboba\venv\lib\site-packages\sanic_auth_init_.py", line 47, in login_user self.get_session(request)[self.auth_session_key] = self.serialize(user) File "C:\Users\Beliboba\PycharmProjects\beliboba\venv\lib\site-packages\sanic_auth_init_.py", line 143, in get_session return request.ctx.session AttributeError: 'list' object has no attribute 'ctx'

beliboba avatar Apr 25 '22 13:04 beliboba

Added middleware but i dont know what actually i need to do with it image Now it gives me following error: image

beliboba avatar May 02 '22 13:05 beliboba

Are you running the example code? Sanic changed where the context object is located, please install the latest Sanic-Auth and use the latest example in this repository, if the problem persists, please let me know.

pyx avatar Oct 20 '23 23:10 pyx

hi! I dont remember anything now, thanks for answer btw 😏

beliboba avatar Oct 24 '23 19:10 beliboba