You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 675, in _request_work
r = self._requester.request(method, url, params = parsnew, timeout = self._timeout, verify = self._checkssl, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/requester.py", line 105, in request
return requests.request(method, url, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 474, in prepare_url
enc_params = self._encode_params(params)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 129, in _encode_params
v.encode("utf-8") if isinstance(v, str) else v,
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 69-70: surrogates not allowed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/python3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/main.py", line 13, in
main()
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 3826, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1888, in upload
return self._upload_dir(lpath, rpath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1796, in _upload_dir
result = self._upload_dir_single(localpath, remotepath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1778, in _upload_dir_single
thisresult = self._walk_upload(localpath, remotepath, ondup, walk)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1763, in _walk_upload
fileresult = self._upload_file(lfile, rfile, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1846, in _upload_file
result = self._upload_one_file(localpath, remotepath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1723, in _upload_one_file
return self._stream_upload(f, pars,
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1522, in _stream_upload
return self._post(url,
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 885, in _post
return self._request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 860, in _request
result = self._request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 816, in _request_work
if ex.message == 'No JSON object could be decoded':
AttributeError: 'UnicodeEncodeError' object has no attribute 'message'
Skip saving Hash Cache since it has not been updated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
`bypy上传的文件的文件名包含非英文字符(中文或其他未知字符)报错如下:
Traceback (most recent call last):
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 675, in _request_work
r = self._requester.request(method, url, params = parsnew, timeout = self._timeout, verify = self._checkssl, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/requester.py", line 105, in request
return requests.request(method, url, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 474, in prepare_url
enc_params = self._encode_params(params)
File "/usr/local/python3.8/lib/python3.8/site-packages/requests/models.py", line 129, in _encode_params
v.encode("utf-8") if isinstance(v, str) else v,
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 69-70: surrogates not allowed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/python3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/main.py", line 13, in
main()
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 3826, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1888, in upload
return self._upload_dir(lpath, rpath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1796, in _upload_dir
result = self._upload_dir_single(localpath, remotepath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1778, in _upload_dir_single
thisresult = self._walk_upload(localpath, remotepath, ondup, walk)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1763, in _walk_upload
fileresult = self._upload_file(lfile, rfile, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1846, in _upload_file
result = self._upload_one_file(localpath, remotepath, ondup)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1723, in _upload_one_file
return self._stream_upload(f, pars,
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 1522, in _stream_upload
return self._post(url,
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 885, in _post
return self._request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 860, in _request
result = self._request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/python3.8/lib/python3.8/site-packages/bypy/bypy.py", line 816, in _request_work
if ex.message == 'No JSON object could be decoded':
AttributeError: 'UnicodeEncodeError' object has no attribute 'message'
Skip saving Hash Cache since it has not been updated.
已经将把系统的区域编码设置为非常标准的UTF-8了,是按照:http://perlgeek.de/en/article/set-up-a-clean-utf8-environment 来做的。
请问怎么修复?`
Beta Was this translation helpful? Give feedback.
All reactions