Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法通过授权这部分 #315

Closed
lupus721 opened this issue Jan 7, 2017 · 2 comments
Closed

无法通过授权这部分 #315

lupus721 opened this issue Jan 7, 2017 · 2 comments

Comments

@lupus721
Copy link

lupus721 commented Jan 7, 2017

python bypy.py info -dv
`python bypy.py info -dv
Loading Hash Cache File '/root/.bypy/bypy.hashcache.json'...
Hash Cache File '/root/.bypy/bypy.hashcache.json' not found, no caching

Verbose level = 1
Debug level = 1
Config directory: '/root/.bypy'
Token file: '/root/.bypy/bypy.json'
Hash Cache file: '/root/.bypy/bypy.hashcache.json'
App root path at Baidu Yun '/apps/bypy'
sys.stdin.encoding = UTF-8
sys.stdout.encoding = UTF-8
sys.stderr.encoding = UTF-8

Error while loading baidu pcs token.
Exception:
<type 'exceptions.IOError'> - [Errno 2] No such file or directory: '/root/.bypy/bypy.json'
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1522, in init
if not self.__load_local_json():
File "bypy.py", line 1883, in __load_local_json
self.pd("Error while loading baidu pcs token.\n{}".format(formatex(ex)))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

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 within 10 minutes.
Press [Enter] when you are done

auth_code:
Authorizing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
GET https://bypy-tianze.rhcloud.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
Full URL: https://bypy-tianze.rhcloud.com/auth?code=&redirect_uri=oob
HTTP Status Code: 200
[16:20:17] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:20:17] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
GET https://bypyoauth.herokuapp.com/auth
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:20:17] Waiting 10 seconds before retrying...
[16:20:27] Request Try #2 / 5
GET https://bypyoauth.herokuapp.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
Full URL: https://bypyoauth.herokuapp.com/auth?code=&redirect_uri=oob
HTTP Status Code: 200
[16:20:28] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:20:28] Waiting 20 seconds before retrying...
[16:20:48] Request Try #3 / 5
GET https://bypyoauth.herokuapp.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
Full URL: https://bypyoauth.herokuapp.com/auth?code=&redirect_uri=oob
HTTP Status Code: 200
[16:20:48] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:20:48] Waiting 30 seconds before retrying...
[16:21:18] Request Try #4 / 5
GET https://bypyoauth.herokuapp.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
Full URL: https://bypyoauth.herokuapp.com/auth?code=&redirect_uri=oob
HTTP Status Code: 200
[16:21:18] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:21:18] Waiting 40 seconds before retrying...
[16:21:58] Request Try #5 / 5
GET https://bypyoauth.herokuapp.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
Full URL: https://bypyoauth.herokuapp.com/auth?code=&redirect_uri=oob
HTTP Status Code: 200
[16:21:59] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "bypy.py", line 4368, in
main()
File "bypy.py", line 4340, in main
verbose = args.verbose, debug = args.debug)
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:21:59] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
GET https://bypyoauth.appspot.com/auth
actargs: None
Params: {u'code': '', u'redirect_uri': u'oob'}
File "bypy.py", line 1524, in init
result = self.__auth()
File "bypy.py", line 1977, in __auth
return self.__server_auth()
File "bypy.py", line 1952, in __server_auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[16:21:59] Maximum number (1) of tries failed.
[16:21:59] Fatal: All server authorizations failed.
[16:21:59] ----------------------------------------------------------------
[16:21:59] This is most likely caused by authorization errors.
Possible causes:

  • You didn't run this program for a long time (more than a month).
  • You changed your Baidu password after authorizing this program.
  • You didn't give this program the 'netdisk' access while authorizing.
  • ...
    Possible fixes:
  1. Remove the authorization token by running with the parameter '-c', and then re-run this program.
  2. If (1) still doesn't solve the problem, you may have to go to:
    https://passport.baidu.com/accountbind
    and remove the authorization of this program, and then re-run this program.
    [16:21:59] Program authorization FAILED.
    You need to authorize this program before using any PCS functions.
    Quitting...
    `
    已经尝试了 -c 以及解绑重新认证来过的顺序,但是依然卡着,没法继续
@lupus721
Copy link
Author

lupus721 commented Jan 7, 2017

我的问题。。。

@lupus721 lupus721 closed this as completed Jan 7, 2017
@zhaoyxiong
Copy link

请问是怎么解决的呢? 版本问题吗? 我的也是这个报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants