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

我快绝望了,上传失败,下载偶尔成功 #26

Closed sprders closed 1 year ago

sprders commented 6 years ago

上传失败:

上传不到1m的小文件svn.txt ,而且是英文命名的

$ odcmd put /home/ubuntu/Downloads/svn.txt od:/ Path (/LiveFolders//svn.txt) contains invalid leading character.(报错)

上传文件名含有中文字符的pdf也报错,不到20m:

Traceback (most recent call last): File "/home/ubuntu/.local/bin/odcmd", line 11, in sys.exit(main()) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/onedrivecmd.py", line 67, in main do_put(client, args) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/actions.py", line 393, in do_put chunksize = int(args.chunk)) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/uploader.py", line 69, in upload_self api_url = api_base_url + 'drive/root:{dest_path}:/upload.createSession'.format(dest_path = dest_path) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 13: ordinal not in range(128)

下载失败:

不含有中文字符,大小就不到10m:

$ odcmd get od:/SwitchyOmega_Chromium.crx ./

Traceback (most recent call last): File "/home/ubuntu/.local/bin/odcmd", line 11, in sys.exit(main()) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/onedrivecmd.py", line 61, in main do_get(client, args) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/actions.py", line 203, in do_get total_length = int(r.headers.get('content-length')) TypeError: int() argument must be a string or a number, not 'NoneType'

下载含有中文字符的也报错:

报错同上

系统:Ubuntu 18.04 LTS 已绝望😞😞😞😞😞😞😞😞😞😞

cnbeining commented 6 years ago

试试Python 3版本?

pip3 install onedrivecmd ?

在 2018年5月16日,上午5:59,Ding notifications@github.com 写道:

上传失败:

上传不到1m的小文件svn.txt ,而且是英文命名的

$ odcmd put /home/ubuntu/Downloads/svn.txt od:/ Path (/LiveFolders//svn.txt) contains invalid leading character.(报错)

上传文件名含有中文字符的pdf也报错,不到20m:

Traceback (most recent call last): File "/home/ubuntu/.local/bin/odcmd", line 11, in sys.exit(main()) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/onedrivecmd.py", line 67, in main do_put(client, args) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/actions.py", line 393, in do_put chunksize = int(args.chunk)) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/uploader.py", line 69, in upload_self api_url = api_base_url + 'drive/root:{dest_path}:/upload.createSession'.format(dest_path = dest_path) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 13: ordinal not in range(128)

下载失败:

不含有中文字符,大小就不到10m:

$ odcmd get od:/SwitchyOmega_Chromium.crx ./

Traceback (most recent call last): File "/home/ubuntu/.local/bin/odcmd", line 11, in sys.exit(main()) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/onedrivecmd.py", line 61, in main do_get(client, args) File "/home/ubuntu/.local/lib/python2.7/site-packages/onedrivecmd/utils/actions.py", line 203, in do_get total_length = int(r.headers.get('content-length')) TypeError: int() argument must be a string or a number, not 'NoneType'

下载含有中文字符的也报错:

报错同上

系统:Ubuntu 18.04 LTS 已绝望😞😞😞😞😞😞😞😞😞😞

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cnbeining/onedrivecmd/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/ABfRgoocaG9yiDjEoref_FbdSYRfeEv2ks5ty_h_gaJpZM4UBAdu.

sprders commented 6 years ago

也不行,我已经放弃了。

die-Deutsche-Orthopaedie commented 6 years ago

又是蛋疼的python编码问题,试下将系统编码改成utf-8

cnbeining commented 6 years ago

以后我再也不手欠写Python 2/3兼容的东西了。

换Python3试试 系统设UTF8.

在 2018年6月15日,下午9:02,die♂Deutsche♂Orthopädie♂spezialist notifications@github.com 写道:

又是蛋疼的python编码问题,试下将系统编码改成utf-8

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