上传文件报错,版本号:1.8.9
Author: JamesLee66Created Sep 13, 2025Updated Dec 24, 2025
**版本号:1.8.9**
命令: bypy upload abc.tar.gz --slice 20G -v -d
文件大小:2.98G
报错信息:
`
Auth servers loaded: {'AuthServerList': [['https://bypyoa.vercel.app/api/auth', False, 'Authorizing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/auth', False, 'Vercel server failed, Authorizing with the cloudendpoint server ...'], ['https://8.142.131.121:8443/auth', False, 'Vercel server failed. Last resort: authorizing with the Aliyun server ...']], 'RefreshServerList': [['https://bypyoa.vercel.app/api/refresh', False, 'Refreshing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/refresh', False, 'Vercel server failed, Refreshing with the cloudendpoint server ...'], ['https://8.142.131.121:8443/refresh', False, 'Vercel server failed. Last resort: refreshing with the Aliyun server ...']]}
[09:40:19] Using requests.packages.urllib3 to disable warnings
[09:40:19] Using urllib3 to disable warnings
Loading Hash Cache File '/root/.bypy/bypy.hashcache.json'...
Hash Cache File loaded.
----
Verbose level = 1
Debug level = 1
Config directory: '/root/.bypy'
Token file: '/root/.bypy/bypy.json'
Hash Cache file: '/root/.bypy/bypy.hashcache.json'
App root path at Baidu Yun '/apps/bypy'
sys.stdin.encoding = UTF-8
sys.stdout.encoding = UTF-8
sys.stderr.encoding = UTF-8
----
Token loaded:
{'access_token': '121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ', 'expires_in': 2592000, 'refresh_token': '122.c851ca99d07d1f527f89f7c813afa783.Ya8jL53W3AC0UmQSorW0etScN9BUy6Bp1HNPGZp.R7BkxA', 'scope': 'basic netdisk', 'session_key': '', 'session_secret': ''}
Uploading file 'abc.tar.gz'
__get_file_info(): rdir : /apps/bypy | rfile: abc.tar.gz
GET https://pcs.baidu.com/rest/2.0/pcs/file
actargs: ['/apps/bypy/abc.tar.gz', 0]
Params: {'method': 'list', 'path': '/apps/bypy', 'by': 'name', 'order': 'asc', 'limit': '0-1000'}
Full URL: https://pcs.baidu.com/rest/2.0/pcs/file?method=list&path=%2Fapps%2Fbypy&by=name&order=asc&limit=0-1000&access_token=121.63d1797326ba68e206023468224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ
HTTP Status Code: 200
200 OK, processing action
List json: {'list': [], 'request_id': 158909264657254653}
remote path is '/apps/bypy/abc.tar.gz'
'abc.tar.gz' is being RapidUploaded.
[09:40:19] Cache hit for file 'abc.tar.gz',
md5: ea9103369gae59d7fcb3feca26377134
size: 2891171145
mtime: 1757670252
[09:40:19] Cache hit for file 'abc.tar.gz',
slice_md5: 456abe697839e75a5c92de30d86a5d9b
size: 2891171145
mtime: 1757670252
[09:40:19] Cache hit for file 'abc.tar.gz',
crc32: 2243911800
size: 2891171145
mtime: 1757670252
RapidUploading Length: 2891171145 MD5: ea9103369gae59d7fcb3feca26377134, Slice-MD5: 456abe697839e75a5c92de30d86a5d9b, CRC: 0x85bf6078
POST https://pcs.baidu.com/rest/2.0/pcs/file
actargs: None
Params: {'method': 'rapidupload', 'path': '/apps/bypy/abc.tar.gz', 'content-length': 2891171145, 'content-md5': 'ea9103369gae59d7fcb3feca26377134', 'slice-md5': '456abe697839e75a5c92de30d86a5d9b', 'content-crc32': '0x85bf6078', 'ondup': 'overwrite'}
Full URL: https://pcs.baidu.com/rest/2.0/pcs/file?method=rapidupload&path=%2Fapps%2Fbypy%2Fabc.tar.gz&content-length=2891171145&content-md5=ea9103369gae59d7fcb3feca26377134&slice-md5=456abe697839e75a5c92de30d86a5d9b&content-crc32=0x85bf6078&ondup=overwrite&access_token=121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ
HTTP Status Code: 400
Website returned JSON: {'error_code': 31023, 'error_msg': 'param error', 'request_id': 158909355854146994}
[09:40:20] Error accessing 'https://pcs.baidu.com/rest/2.0/pcs/file'
[09:40:20]
[09:40:20] Function: _rapidupload_file_act
[09:40:20] Website parameters: {'method': 'rapidupload', 'path': '/apps/bypy/abc.tar.gz', 'content-length': 2891171145, 'content-md5': 'ea9103369gae59d7fcb3feca26377134', 'slice-md5': '456abe697839e75a5c92de30d86a5d9b', 'content-crc32': '0x85bf6078', 'ondup': 'overwrite'}
[09:40:20] Full URL: https://pcs.baidu.com/rest/2.0/pcs/file?method=rapidupload&path=%2Fapps%2Fbypy%2Fabc.tar.gz&content-length=2891171145&content-md5=ea9103369gae59d7fcb3feca26377134&slice-md5=456abe697839e75a5c92de30d86a5d9b&content-crc32=0x85bf6078&ondup=overwrite&access_token=121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ
[09:40:20] HTTP Response Status Code: 400
[09:40:20] Error JSON returned:{'error_code': 31023, 'error_msg': 'param error', 'request_id': 158909355854146994}
Error code: 31023
Error Description: param error
[09:40:20] Website returned: {"error_code":31023,"error_msg":"param error","request_id":158909355854146994}
'abc.tar.gz' can't be RapidUploaded, now trying normal uploading.
'abc.tar.gz' is being non-slicing uploaded.
POST https://c.pcs.baidu.com/rest/2.0/pcs/file
actargs: /apps/bypy/abc.tar.gz
Params: {'method': 'upload', 'path': '/apps/bypy/abc.tar.gz', 'ondup': 'overwrite'}
Full URL: https://c.pcs.baidu.com/rest/2.0/pcs/file?method=upload&path=%2Fapps%2Fbypy%2Fabc.tar.gz&ondup=overwrite&access_token=121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ
HTTP Status Code: 413
Website Response:
413 Request Entity Too Large
nginx/1.12.2 [09:40:50] Error accessing 'https://c.pcs.baidu.com/rest/2.0/pcs/file' [09:40:50] [09:40:50] Function: _upload_one_file_act [09:40:50] Website parameters: {'method': 'upload', 'path': '/apps/bypy/abc.tar.gz', 'ondup': 'overwrite'} [09:40:50] Full URL: https://c.pcs.baidu.com/rest/2.0/pcs/file?method=upload&path=%2Fapps%2Fbypy%2Fabc.tar.gz&ondup=overwrite&access_token=121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ [09:40:50] HTTP Response Status Code: 413 [09:40:50] Error parsing JSON Error Code from: 413 Request Entity Too Large
nginx/1.12.2 Exception: - [Errno Expecting value] 413 Request Entity Too Large
nginx/1.12.2 : 0 Stack: File "/usr/local/bin/bypy", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 3861, in main result = getattr(by, args.command[0])(*uargs) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1915, in upload return self._upload_file(lpath, rpath, ondup) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1858, in _upload_file result = self._upload_one_file(localpath, remotepath, ondup) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1755, in _upload_one_file self._upload_one_file_act, remotepath) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1555, in _stream_upload headers=headers, data=form) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 909, in _post return self._request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 884, in _request result = self._request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 788, in _request_work self._dump_exception(None, url, pars, r, act) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 628, in _dump_exception self._print_error_json(r) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 609, in _print_error_json perr('Error parsing JSON Error Code from:\n{}\n{}'.format(rb(r.text), formatex(ex))) File "/usr/local/lib/python3.6/site-packages/bypy/util.py", line 73, in formatex type(ex), ex, ''.join(traceback.format_stack())) [09:40:50] Website returned: 413 Request Entity Too Large
nginx/1.12.2 [09:40:50] Waiting 10 seconds before retrying... [09:41:00] Request Try #2 / 5 `
413 Request Entity Too Large
nginx/1.12.2 [09:40:50] Error accessing 'https://c.pcs.baidu.com/rest/2.0/pcs/file' [09:40:50] [09:40:50] Function: _upload_one_file_act [09:40:50] Website parameters: {'method': 'upload', 'path': '/apps/bypy/abc.tar.gz', 'ondup': 'overwrite'} [09:40:50] Full URL: https://c.pcs.baidu.com/rest/2.0/pcs/file?method=upload&path=%2Fapps%2Fbypy%2Fabc.tar.gz&ondup=overwrite&access_token=121.63d1797321234567890abcdefge68224.Ysaxvd5c9s1dSuvvahlE61HkC75AROft7xn-N6A.Es2buQ [09:40:50] HTTP Response Status Code: 413 [09:40:50] Error parsing JSON Error Code from: 413 Request Entity Too Large
413 Request Entity Too Large
nginx/1.12.2 Exception: - [Errno Expecting value] 413 Request Entity Too Large
413 Request Entity Too Large
nginx/1.12.2 : 0 Stack: File "/usr/local/bin/bypy", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 3861, in main result = getattr(by, args.command[0])(*uargs) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1915, in upload return self._upload_file(lpath, rpath, ondup) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1858, in _upload_file result = self._upload_one_file(localpath, remotepath, ondup) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1755, in _upload_one_file self._upload_one_file_act, remotepath) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 1555, in _stream_upload headers=headers, data=form) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 909, in _post return self._request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 884, in _request result = self._request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 788, in _request_work self._dump_exception(None, url, pars, r, act) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 628, in _dump_exception self._print_error_json(r) File "/usr/local/lib/python3.6/site-packages/bypy/bypy.py", line 609, in _print_error_json perr('Error parsing JSON Error Code from:\n{}\n{}'.format(rb(r.text), formatex(ex))) File "/usr/local/lib/python3.6/site-packages/bypy/util.py", line 73, in formatex type(ex), ex, ''.join(traceback.format_stack())) [09:40:50] Website returned: 413 Request Entity Too Large
413 Request Entity Too Large
nginx/1.12.2 [09:40:50] Waiting 10 seconds before retrying... [09:41:00] Request Try #2 / 5 `
Source: houtianze/bypy