Comments (6)
应该不用翻墙,这个看起来有点怪。你能命令行加 -d -v跑一下,然后再贴一下输出吗?
from bypy.
Loading Hash Cache File '/home/cubie/.bypy.pickle'...
Hash Cache File not found, no caching
[12:53:39] Error while loading baidu pcs token:
[12:53:39] Traceback (most recent call last):
File "bypy.py", line 1016, in __load_local_json
with open(TokenFilePath, 'rb') as infile:
IOError: [Errno 2] No such file or directory: u'/home/cubie/.bypy.json'
Please visit:
https://openapi.baidu.com/oauth/2.0/authorize?scope=basic+netdisk&redirect_uri=oob&response_type=code&client_id=q8WE4EpCsau1oS0MplgMKNBn
And authorize this app
Paste the Authorization Code here and then press [Enter] within 10 minutes.
4074256a553f06b722580e2d8a295da4
auth_code: 4074256a553f06b722580e2d8a295da4
Authorizing, please be patient, it may take upto 60.0 seconds...
GET https://bypyoauth.appspot.com/auth
actargs: None
Params: {u'code': '4074256a553f06b722580e2d8a295da4', u'redirect_uri': u'oob'}
[12:54:57] Error accessing 'https://bypyoauth.appspot.com/auth'
[12:54:57] Exception: Request timed out.
Traceback (most recent call last):
File "bypy.py", line 899, in __request_work
params = parsnew, timeout = self.__timeout, verify = False, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 52, in get
return request('get', url, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 40, in request
return s.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 229, in request
r.send(prefetch=prefetch)
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 611, in send
raise Timeout('Request timed out.')
Timeout: Request timed out.
[12:54:57] Function: __server_auth_act
[12:54:57] Website parameters: {u'code': '4074256a553f06b722580e2d8a295da4', u'redirect_uri': u'oob'}
[12:54:57] Maximum number (1) of tries failed.
I think you are WALLed, trying OpenShift server to auth...
GET https://bypy-tianze.rhcloud.com/auth
actargs: None
Params: {u'code': '4074256a553f06b722580e2d8a295da4', u'redirect_uri': u'oob'}
HTTP Status Code: 200
Request OK, processing action
[12:55:09] Error accessing 'https://bypy-tianze.rhcloud.com/auth'
[12:55:09] Exception: 'dict' object is not callable
Traceback (most recent call last):
File "bypy.py", line 918, in __request_work
result = act(r, actargs)
File "bypy.py", line 1046, in __server_auth_act
return self.__store_json(r)
File "bypy.py", line 1043, in __store_json
return self.__store_json_only(r.json())
TypeError: 'dict' object is not callable
[12:55:09] Function: __server_auth_act
[12:55:09] Website parameters: {u'code': '4074256a553f06b722580e2d8a295da4', u'redirect_uri': u'oob'}
[12:55:09] HTTP Status Code: 200
[12:55:09] Error parsing JSON Error Code from:
{"expires_in":2592000,"refresh_token":"22.a1dac77b456d8b9f4887df6652b0c33f.315360000.1711889711.1862768342-1572671","access_token":"21.29582efb7f5aeb66dbc4a9ce274e9497.2592000.1399121711.1862768342-1572671","session_secret":"118647d63f3fbd332a6baff438e08c60","session_key":"9mnRdvuTW26HJWFz/GxIJVGSuC4k9FrmR/NKh0VIOihKSB+BPSi2Bw4ESP2fLfsgBLM2S1cgzyStQ1usgbguXnrd21p5KPDmfQ==","scope":"basic netdisk"}
[12:55:09] Exception: Traceback (most recent call last):
File "bypy.py", line 853, in __print_error_json
dj = r.json()
TypeError: 'dict' object is not callable
[12:55:09] Website returned: {"expires_in":2592000,"refresh_token":"22.a1dac77b456d8b9f4887df6652b0c33f.315360000.1711889711.1862768342-1572671","access_token":"21.29582efb7f5aeb66dbc4a9ce274e9497.2592000.1399121711.1862768342-1572671","session_secret":"118647d63f3fbd332a6baff438e08c60","session_key":"9mnRdvuTW26HJWFz/GxIJVGSuC4k9FrmR/NKh0VIOihKSB+BPSi2Bw4ESP2fLfsgBLM2S1cgzyStQ1usgbguXnrd21p5KPDmfQ==","scope":"basic netdisk"}
[12:55:09] Fatal Exception.
Quitting...
Not saving Hash Cache since 'dirty' is 'False' and 'force_saving' is 'False'
from bypy.
Debian GNU/Linux 7 \n \l
Linux version 3.4.75-sun7i (root@ubtu) (gcc version 4.8.2 20130603 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.06 - Linaro GCC 2013.06) ) #36 SMP PREEMPT Mon Feb 10 02:47:28 CST 2014
Python 2.7.3
Linux版本,内核版本,python版本
from bypy.
會不會是 python requests library 版本太舊? ... 我有一部電腦是用 Ubuntu 12.04.4 LTS, 它的 python-requests 版本是 0.8.2, 也是類似的狀況. 後來改用 pip 安裝 requests, 版本是 2.2.1.. 問題就解決了.
from bypy.
看来真的是requests的问题,不单是requests版本第,pip的版本也低,所以第一次-U的时候他并未帮我更新好requests,我升级了pip之后再升级requests才能成功的升级到2.2.1....
感谢你的解答,麻烦了:)
from bypy.
Google了一下,嗯,应该是Requests太旧的问题。不客气:)
from bypy.
Related Issues (20)
- upload开了会员,依然被限速 HOT 6
- You need to authorize this program before using any PCS functions. HOT 1
- 更新最新版本后,一直出现错误提示 HOT 1
- syncup失败 HOT 4
- syncup前后文件名和文件大小一致,但因md5校验码不同被判定为不同文件 HOT 1
- Questions about Copilot + Open Source Software Hierarchy
- 每次上传要报错一次,不知道有没有影响 HOT 3
- 一直授权不成功,http error, 贴出了bypy -dv info HOT 1
- Error accessing 'https://pcs.baidu.com/rest/2.0/pcs/file' HOT 3
- 授权不成功 HOT 1
- Trigger security policy 错误 HOT 1
- 无法获得授权 HOT 1
- 无法调用bypy info命令 HOT 11
- bypy info 绑定失败 HOT 1
- 执行两次一样的上传命令会导致文件被删除 HOT 3
- 放个收款码吧,用着都不好意思了哈哈😂
- 下载到服务器一直等待 HOT 1
- 无法进行授权Token refreshing failed
- 目录问题
- 上传单个文件报错码 31112 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bypy.