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

每个月都需要重新认证一次 #304

Closed
Septrum101 opened this issue Nov 15, 2016 · 2 comments
Closed

每个月都需要重新认证一次 #304

Septrum101 opened this issue Nov 15, 2016 · 2 comments

Comments

@Septrum101
Copy link

设置了crontab每周运行一次,可是连续3个月,每次都是认证后第五周的备份出现认证失败,执行bypy -c后重新认证又能正常4周,第五周又会上传失败。
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
tar: 从成员名中删除开头的“/”
tar: 从成员名中删除开头的“/”
Refreshing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
[03:30:25] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:30:25] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
[03:30:26] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:30:26] Waiting 10 seconds before retrying...
[03:30:36] Request Try #2 / 5
[03:30:37] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:30:37] Waiting 20 seconds before retrying...
[03:30:57] Request Try #3 / 5
[03:30:58] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:30:58] Waiting 30 seconds before retrying...
[03:31:28] Request Try #4 / 5
[03:31:28] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:31:28] Waiting 40 seconds before retrying...
[03:32:09] Request Try #5 / 5
[03:32:09] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:09] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
[03:32:10] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 3168, in mkdir
return self.__mkdir(rpath)
File "/usr/local/bin/bypy.py", line 3159, in __mkdir
return self.__post(pcsurl + 'file', pars, self.__mkdir_act, **kwargs)
File "/usr/local/bin/bypy.py", line 1845, in __post
return self.__request(url, pars, act, 'POST', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:10] Maximum number (1) of tries failed.
[03:32:10] Token-refreshing on all the servers failed
[03:32:10] ----------------------------------------------------------------
[03:32:10] 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.
    [03:32:10] FATAL: Token refreshing failed, can't continue.
    Quitting...

Refreshing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
[03:32:13] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:13] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
[03:32:15] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:15] Waiting 10 seconds before retrying...
[03:32:25] Request Try #2 / 5
[03:32:26] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:26] Waiting 20 seconds before retrying...
[03:32:46] Request Try #3 / 5
[03:32:47] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:32:47] Waiting 30 seconds before retrying...
[03:33:17] Request Try #4 / 5
[03:33:18] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:33:18] Waiting 40 seconds before retrying...
[03:33:58] Request Try #5 / 5
[03:33:59] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:33:59] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
[03:34:59] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:34:59] Maximum number (1) of tries failed.
[03:34:59] Token-refreshing on all the servers failed
[03:34:59] ----------------------------------------------------------------
[03:34: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.
    [03:34:59] FATAL: Token refreshing failed, can't continue.
    Quitting...

Refreshing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
[03:35:02] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:35:02] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
[03:35:03] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:35:03] Waiting 10 seconds before retrying...
[03:35:13] Request Try #2 / 5
[03:35:14] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:35:14] Waiting 20 seconds before retrying...
[03:35:34] Request Try #3 / 5
[03:35:35] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:35:35] Waiting 30 seconds before retrying...
[03:36:05] Request Try #4 / 5
[03:36:06] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:36:06] Waiting 40 seconds before retrying...
[03:36:46] Request Try #5 / 5
[03:36:47] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:36:47] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
[03:36:48] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:36:48] Maximum number (1) of tries failed.
[03:36:48] Token-refreshing on all the servers failed
[03:36:48] ----------------------------------------------------------------
[03:36:48] 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.
    [03:36:48] FATAL: Token refreshing failed, can't continue.
    Quitting...

Refreshing, please be patient, it may take upto 60.0 seconds...
Authorizing/refreshing with the OpenShift server ...
[03:36:51] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:36:51] Maximum number (1) of tries failed.
OpenShift server failed, authorizing/refreshing with the Heroku server ...
[03:36:52] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:36:52] Waiting 10 seconds before retrying...
[03:37:02] Request Try #2 / 5
[03:37:03] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:37:03] Waiting 20 seconds before retrying...
[03:37:23] Request Try #3 / 5
[03:37:24] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:37:24] Waiting 30 seconds before retrying...
[03:37:54] Request Try #4 / 5
[03:37:55] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:37:55] Waiting 40 seconds before retrying...
[03:38:35] Request Try #5 / 5
[03:38:36] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:38:36] Maximum number (5) of tries failed.
Heroku server failed. Last resort: authorizing/refreshing with the GAE server ...
[03:38:36] Exception:
<type 'exceptions.ValueError'> - No JSON object could be decoded
Stack:
File "/usr/local/bin/bypy.py", line 4469, in
main()
File "/usr/local/bin/bypy.py", line 4448, in main
result = getattr(by, args.command[0])(*uargs)
File "/usr/local/bin/bypy.py", line 2657, in upload
subresult = self.__get_file_info(rpath)
File "/usr/local/bin/bypy.py", line 2212, in __get_file_info
return self.__get(pcsurl + 'file', pars, self.__get_file_info_act, remotefile, **kwargs)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1689, in __request_work
if ENoError == self.__refresh_token(): # refresh the token and re-request
File "/usr/local/bin/bypy.py", line 2041, in __refresh_token
result = self.__get(url, pars, self.__refresh_token_act, retry = retry, addtoken = False)
File "/usr/local/bin/bypy.py", line 1842, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/bin/bypy.py", line 1820, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/bin/bypy.py", line 1671, in __request_work
perr(formatex(ex))
File "/usr/local/bin/bypy.py", line 494, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[03:38:36] Maximum number (1) of tries failed.
[03:38:36] Token-refreshing on all the servers failed
[03:38:36] ----------------------------------------------------------------
[03:38:36] 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.
    [03:38:36] FATAL: Token refreshing failed, can't continue.
    Quitting...
@metorm
Copy link

metorm commented Nov 25, 2016

这个应该是百度的限制吧
否则岂不是用第三方脚本就可以实现会员的功能

@houtianze
Copy link
Owner

感谢反馈。

这个应该是百度方面的(文档说refresh token可以十年内可用,但是实际上也是一个月的有效期)。如果cron来做,倒是有个解决办法:在每少过一个月的时间内用bypy refreshtoken来更新用户令牌,应该是不会再出错了。

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

3 participants