Skip to content
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

仍然登陆失败 #14

Open
staneychan opened this issue Feb 6, 2020 · 0 comments
Open

仍然登陆失败 #14

staneychan opened this issue Feb 6, 2020 · 0 comments

Comments

@staneychan
Copy link

在微信小程序端登陆点击“授权”按钮时,后端python
utils/weixin_util/weixin/lib/wxcrypt.py失败报错:

[06/Feb/2020 18:31:52] "POST /users/login/ HTTP/1.1" 400 67 Internal Server Error: /users/Registered/ Traceback (most recent call last): File "/usr/local/python3/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/python3/lib/python3.7/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/python3/lib/python3.7/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/python3/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/rest_framework/viewsets.py", line 95, in view return self.dispatch(request, *args, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/rest_framework/views.py", line 494, in dispatch response = self.handle_exception(exc) File "/usr/local/python3/lib/python3.7/site-packages/rest_framework/views.py", line 454, in handle_exception self.raise_uncaught_exception(exc) File "/usr/local/python3/lib/python3.7/site-packages/rest_framework/views.py", line 491, in dispatch response = handler(request, *args, **kwargs) File "/usr/local/src/backend/Yiqi/Yiqi/apps/users/views.py", line 163, in create user_info = crypt.decrypt(encrypted_data, iv) # 获取到用户的登陆信息 File "/usr/local/src/backend/Yiqi/Yiqi/utils/weixin_util/weixin/lib/wxcrypt.py", line 32, in decrypt str1 = str(user_data, encoding="utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 2: invalid start byte [06/Feb/2020 18:31:53] "POST /users/Registered/ HTTP/1.1" 500 17110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant