AttributeError: type object 'SessionAuthentication' has no attribute 'get_user'
ahmadhaidarahmad opened this issue · 1 comments
ahmadhaidarahmad commented
I'm getting this error when websocket is disconnected:
ERROR - worker - Error processing message with consumer django_nyt.consumers.ws_disconnect:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\channels\worker.py", line 119, in run
consumer(message, **kwargs)
File "C:\Python27\lib\site-packages\channels\sessions.py", line 78, in inner
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\channels\auth.py", line 48, in inner
message.user = auth.get_user(fake_request)
AttributeError: type object 'SessionAuthentication' has no attribute 'get_user'
Any Help please
benjaoming commented
AttributeError: type object 'SessionAuthentication' has no attribute 'get_user'
That sounds very very odd, I can't figure it out for you. Basically, the current version of channels.auth
has these contents, and if you look at them, then auth
is the imported module django.auth
, which should not give you this error.
Unless of course this is a Django 2.0 related problem, in which case I can't help you ATM - other than try to ensure that you have Django 1.11.