Djangorestframework-simplejwt: AttributeError: 'str' object has no attribute 'decode'

Created on 27 Dec 2020  路  5Comments  路  Source: jazzband/djangorestframework-simplejwt

I'm getting an attribute error when attempting to log in using django-rest-framework-simplejwt:

Line: /python3.6/site-packages/django/core/handlers/exception.py, line 47, in inner

exc: AttributeError("'str' object has no attribute 'decode'",)

request:

curl \ -X POST \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "Password123!"}' \ http://localhost:8000/api/token/

packages:

Django==3.1.4

djangorestframework==3.12.2

djangorestframework-simplejwt==4.4.0

duplicate

Most helpful comment

Sorry for the inconvenience, the release notes/changelog should be merged soon.

All 5 comments

Screencast-27-12-2020-100357

Duplicate

I see the issue has been resolved on version 4.6.0 but having difficulty installing it (latest resolving to version 4.4.0)

Screenshot from 2020-12-28 02-17-16

You need to upgrade to Python 3.7+

Sorry for the inconvenience, the release notes/changelog should be merged soon.

Was this page helpful?
0 / 5 - 0 ratings