Git Product home page Git Product logo

Comments (6)

houtianze avatar houtianze commented on August 30, 2024

应该不用翻墙,这个看起来有点怪。你能命令行加 -d -v跑一下,然后再贴一下输出吗?

from bypy.

Huangsir avatar Huangsir commented on August 30, 2024

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.

Huangsir avatar Huangsir commented on August 30, 2024

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.

sdnian avatar sdnian commented on August 30, 2024

會不會是 python requests library 版本太舊? ... 我有一部電腦是用 Ubuntu 12.04.4 LTS, 它的 python-requests 版本是 0.8.2, 也是類似的狀況. 後來改用 pip 安裝 requests, 版本是 2.2.1.. 問題就解決了.

from bypy.

Huangsir avatar Huangsir commented on August 30, 2024

看来真的是requests的问题,不单是requests版本第,pip的版本也低,所以第一次-U的时候他并未帮我更新好requests,我升级了pip之后再升级requests才能成功的升级到2.2.1....
感谢你的解答,麻烦了:)

from bypy.

houtianze avatar houtianze commented on August 30, 2024

Google了一下,嗯,应该是Requests太旧的问题。不客气:)

from bypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.