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

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 5868: invalid start byte #507

Open
lqqla opened this issue Apr 30, 2024 · 0 comments

Comments

@lqqla
Copy link

lqqla commented Apr 30, 2024

[2024-04-30 10:14:29,216] ERROR in app: Exception on /log/output [GET]
Traceback (most recent call last):
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/root/anaconda3/envs/py_12306/lib/python3.7/site-packages/flask_jwt_extended/view_decorators.py", line 103, in wrapper
return fn(*args, **kwargs)
File "/root/py12306-master/py12306/web/handler/log.py", line 30, in log_output
total_line = get_file_total_line_num(file)
File "/root/py12306-master/py12306/helpers/func.py", line 106, in get_file_total_line_num
return len(f.readlines())
File "/root/anaconda3/envs/py_12306/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 5868: invalid start byte

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