에러 메세지

Kim Minsun·2022년 7월 11일
0

Troubleshooting 💣

목록 보기
1/2
post-thumbnail

AttributeError: module 'jwt' has no attribute 'decode'

I did pip uninstall JWT and pip uninstall PyJWT then finally pip install PyJWT. After that it imported the correct module and generated the token!

-> PyJWT 설치하면 ok


localhost:5000 unavailable in macOS v12 (Monterey)

macOS Monterey introduced AirPlay Receiver running on port 5000. This prevents your web server from serving on port 5000. Receiver already has the port.

You can either:
turn off AirPlay Receiver, or;
run the server on a different port (normally best).

-> localhost:3000 이나 8000 등으로 하면 OK


'str' object has no attribute 'decode'

->token = jwt.encode(payload, SECRET_KEY, algorithm='HS256').decode('utf-8') 에서 간단히 .decode('utf-8') 삭제하면 OK


Uncaught SyntaxError: Unexpected identifier

Misspelling a keyword, e.g. Let or Class instead of let and class. 

the server responded with a status of 500

서버 문제

Object of type ObjectId is not JSON serializable

몰라

0개의 댓글