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

<E> [21:11:20] Maximum number (1) of tries failed. <E> [21:11:20] Token-refreshing on all the servers failed #267

Closed
xiaobailong24 opened this issue Jun 19, 2016 · 1 comment

Comments

@xiaobailong24
Copy link

#bypy.py list

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: Can't detect the system encoding, assume it's 'UTF-8'.
Files with non-ASCII names may not be handled correctly.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Encoding for StdOut: ANSI_X3.4-1968
Refreshing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
[21:09:38] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:09:38] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
[21:09:38] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:09:38] Waiting 10 seconds before retrying...
[21:09:48] Request Try #2 / 5
[21:09:48] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:09:48] Waiting 20 seconds before retrying...
[21:10:08] Request Try #3 / 5
[21:10:09] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:10:09] Waiting 30 seconds before retrying...
[21:10:39] Request Try #4 / 5
[21:10:39] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:10:39] Waiting 40 seconds before retrying...
[21:11:19] Request Try #5 / 5
[21:11:19] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:11:19] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
[21:11:20] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4368, in
main()
File "/usr/local/bin/bypy.py", line 4347, in main
result = getattr(by, args.command[0])(_uargs)
File "/usr/local/bin/bypy.py", line 2242, in list
return self.__get(pcsurl + 'file', pars, self.__list_act, (rpath, fmt))
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, *_kwnew)
File "/usr/local/bin/bypy.py", line 1670, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2022, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1823, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, *_kwargs)
File "/usr/local/bin/bypy.py", line 1801, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1652, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 476, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[21:11:20] Maximum number (1) of tries failed.
[21:11:20] Token-refreshing on all the servers failed
[21:11:20] ----------------------------------------------------------------
[21:11:20] 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:
  • Remove the authorization token by running with the parameter '-c', and then re-run this program.
  • 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.
    [21:11:20] FATAL: Token refreshing failed, can't continue.
    Quitting...

重新授权就行了

rm -r ~/.bypy/

bypy.py list

@houtianze
Copy link
Owner

感谢反馈。

这个算是一个已知的问题:超过一个月不用,无法刷新百度令牌(虽然百度文档说10年内都可以刷新,但实际上超过一个月不用就不行了)。

目前解决办法只有重新授权。

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

No branches or pull requests

2 participants