百度网盘上传,本地文件名中含有冒号(:)就会上传失败.
lwl5219 opened this issue · 1 comments
lwl5219 commented
使用脚本上传文件时, 如果文件名中含有冒号(:),就会报错, 把文件名改了之后就会上传成功.
++ uploading: /home/lwl/readfree/dbook/c-革命的年代:1789~1848.mobi
|-- upload_function: _rapidupload_file
|-- can't be RapidUploaded, now trying normal uploading.
|-- upload_function: _upload_one_file
Traceback (most recent call last):
File "/usr/local/bin/bp", line 3610, in <module>
main(argv)
File "/usr/local/bin/bp", line 3606, in main
handle_command(comd, xxx)
File "/usr/local/bin/bp", line 3208, in handle_command
px.upload(xxx[:-1], xxx[-1])
File "/usr/local/bin/bp", line 1477, in upload
self._upload_dir(lpath, rpath)
File "/usr/local/bin/bp", line 1439, in _upload_dir
self._upload_file(localpath, remotepath)
File "/usr/local/bin/bp", line 1383, in _upload_file
result = self._upload_one_file(lpath, rpath)
File "/usr/local/bin/bp", line 1175, in _upload_one_file
r = ss.post(url, params=p, data=data, verify=VERIFY, headers=theaders)
File "/usr/lib/python2.7/site-packages/requests-2.17.3-py2.7.egg/requests/sessions.py", line 560, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.17.3-py2.7.egg/requests/sessions.py", line 513, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.17.3-py2.7.egg/requests/sessions.py", line 623, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.17.3-py2.7.egg/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error("(104, 'ECONNRESET')",))
PeterDing commented
我这里倒是没报 requests.exceptions.ConnectionError
,但是服务器报错,file name is invalid
文件名无效,也就是百度不支持文件带 :
吧。
++ uploading: /private/tmp/t/c-革命的年代:1789~1848.mobi
|-- upload_function: _upload_one_file
!! Error at _upload_one_file: {u'error_code': 31062, u'error_msg': u'file name is invalid', u'request_id': }