-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue with django-rest-auth and dj-rest-auth libraries #14
Comments
I'll have to look through this more in depth. Thank you for bringing it to my attention. My guess here is that at some point that string literally ("Password has been reset with a new password.") is being passed into the renderer. Why that is happening is what we'd need to dig into. |
Yes, having same problem, but with /logout method. |
@double-di for now my solution was just to subclass the view which is failing and set |
What is the >>> import ujson
>>> ujson.dumps("a")
'"a"'
>>> ujson.dumps(b"a")
'"a"'
>>> import json
>>> ujson.dumps("a".encode())
'"a"'
>>> json.dumps("a")
'"a"'
>>> json.dumps(b"a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable
>>> json.dumps("a".encode())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/adammertz/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable |
@pasevin are you still having this issue? |
Yes, it's still happening, unfortunately. |
Not sure why, but can't use this library together with https://github.com/Tivix/django-rest-auth or later fork https://github.com/jazzband/dj-rest-auth. Keep getting errors of this type for all responses:
TypeError: 'Password has been reset with the new password.' is not JSON serializable
The text was updated successfully, but these errors were encountered: