cnbeining / onedrivecmd

A command line client for Onedrive.
https://www.cnbeining.com/
GNU Affero General Public License v3.0
378 stars 78 forks source link

大文件上传中断? #4

Closed ttestdock closed 5 years ago

ttestdock commented 7 years ago
Uploading |############################### | 98.6% - 117s/usr/local/lib/python2.7/dist-packages/requests/packages/ur
llib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 fr
om configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version o
f Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w
arnings                                                                                                             
  InsecurePlatformWarning                                                                                           
Uploading |############################### | 98.8% - 96s/usr/local/lib/python2.7/dist-packages/requests/packages/url
lib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 fro
m configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of
 Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-wa
rnings                                                                                                              
  InsecurePlatformWarning                                                                                           
Traceback (most recent call last):                                                                                  
  File "onedrivecmd.py", line 79, in <module>                                                                       
    main()                                                                                                          
  File "onedrivecmd.py", line 61, in main                                                                           
    do_put(client, args)                                                                                            
  File "/root/onedrivecmd/utils/actions.py", line 300, in do_put                                                    
    chunksize = int(args.chunk))                                                                                    
  File "/root/onedrivecmd/utils/uploader.py", line 83, in upload_self                                               
    range_this=i, file_size= file_size)                                                                             
  File "/root/onedrivecmd/utils/uploader.py", line 41, in upload_one_piece                                          
    headers = headers)                                                                                              
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 124, in put                                   
    return request('put', url, data=data, **kwargs)                                                                 
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 56, in request                                
    return session.request(method=method, url=url, **kwargs)                                                        
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request                          
    resp = self.send(prep, **send_kwargs)                                                                           
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send                             
    r = adapter.send(request, **kwargs)                                                                             
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 473, in send                             
    raise ConnectionError(err, request=request)                                                                     
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))                

4G文件,onedrive for business 教育版,两次都上传失败~ 另外,上传速度能不能优化一下?以及是否有断点上传?

cnbeining commented 7 years ago

请升级你的requests包和所有的依赖。

我觉得requests有可能有坑,但是这个速度不是我能优化的。

断点没有,除非我找到合适的API。否则保持状态太难。

ttestdock commented 7 years ago

python 2.7.6 ,requests pip,显示最新,还是显示SSL问题,刚又试了一次,成功了。 请问API如何自己弄呢?

cnbeining commented 7 years ago

ms有文档和SDK。

2017年3月18日 上午1:48,"ttestdock" notifications@github.com写道:

python 2.7.6 ,requests pip,显示最新,还是显示SSL问题,刚又试了一次,成功了。 请问API如何自己弄呢?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cnbeining/onedrivecmd/issues/4#issuecomment-287518845, or mute the thread https://github.com/notifications/unsubscribe-auth/ABfRgnC1i_1C1_jZs1QrqBLbUrLX4hwIks5rm3BGgaJpZM4MgTws .

DictXiong commented 5 years ago

自动重试功能可以解决这个问题. 至于问题本身, 成因很奇怪, 随机性比较大, 就暂不深入考虑了.