Git Product home page Git Product logo

bypy info 一直授权失败,linux服务器上和windows本地都不行,之前没有使用过,没有进行过授权;并且按照给的建议到百度网站上移除授权,重新授权,试了一下午也没有解决。 about bypy HOT 10 CLOSED

Thegallophorse avatar Thegallophorse commented on July 26, 2024 1
bypy info 一直授权失败,linux服务器上和windows本地都不行,之前没有使用过,没有进行过授权;并且按照给的建议到百度网站上移除授权,重新授权,试了一下午也没有解决。

from bypy.

Comments (10)

AlbertLuk avatar AlbertLuk commented on July 26, 2024 1

我同样遇到这个问题,我觉得是服务器崩了,希望作者能搭回去

from bypy.

Thegallophorse avatar Thegallophorse commented on July 26, 2024

bypy.py info -dv之后会输出这些内容,麻烦帮忙看一下

Auth servers loaded: {'AuthServerList': [['https://bypyoa.vercel.app/api/auth', False, 'Authorizing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/auth', False, 'Vercel server failed, Authorizing with the cloudendpoint server ...'], ['https://8.142.131.12/auth', False, 'Vercel server failed. Last resort: authorizing with the Aliyun server ...']], 'RefreshServerList': [['https://bypyoa.vercel.app/api/refresh', False, 'Refreshing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/refresh', False, 'Vercel server failed, Refreshing with the cloudendpoint server ...'], ['https://8.142.131.12/refresh', False, 'Vercel server failed. Last resort: refreshing with the Aliyun server ...']]}
[19:53:14] Using requests.packages.urllib3 to disable warnings
[19:53:14] Using urllib3 to disable warnings
Loading Hash Cache File '/home/wang/.bypy/bypy.hashcache.json'...
Hash Cache File '/home/wang/.bypy/bypy.hashcache.json' not found, no caching

Verbose level = 1
Debug level = 1
Config directory: '/home/wang/.bypy'
Token file: '/home/wang/.bypy/bypy.json'
Hash Cache file: '/home/wang/.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:
<class 'FileNotFoundError'> - [Errno 2] No such file or directory: '/home/wang/.bypy/bypy.json'
Stack:
File "/usr/local/bin/bypy", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 3815, in main
by = ByPy(**bypyopt)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 466, in init
if not self.__load_local_json():
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 941, in __load_local_json
self.pd("Error while loading baidu pcs token.\n{}".format(formatex(ex)))
File "/usr/local/lib/python3.8/site-packages/bypy/util.py", line 73, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

from bypy.

Thegallophorse avatar Thegallophorse commented on July 26, 2024

Please visit:
https://openapi.baidu.com/oauth/2.0/authorize?client_id=q8WE4EpCsau1oS0MplgMKNBn&response_type=code&redirect_uri=oob&scope=basic+netdisk
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done
xxxxxxxxxxxxxxxxxxx
auth_code: daa5ee2d079e8016e999e33df3eea461
Authorizing, please be patient, it may take upto 300 seconds...
Auth servers updated: {'AuthServerList': [['https://bypyoa.vercel.app/api/auth', False, 'Authorizing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/auth', False, 'Vercel server failed, Authorizing with the cloudendpoint server ...'], ['https://8.142.131.12/auth', False, 'Vercel server failed. Last resort: authorizing with the Aliyun server ...']], 'RefreshServerList': [['https://bypyoa.vercel.app/api/refresh', False, 'Refreshing with the Vercel server ...'], ['https://qcfpba.api.cloudendpoint.cn/refresh', False, 'Vercel server failed, Refreshing with the cloudendpoint server ...'], ['https://8.142.131.12/refresh', False, 'Vercel server failed. Last resort: refreshing with the Aliyun server ...']]}
Authorizing with the Vercel server ...
GET https://bypyoa.vercel.app/api/auth
actargs: None
Params: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
[19:56:12] Error accessing 'https://bypyoa.vercel.app/api/auth'
[19:56:12] Exception:
<class 'requests.exceptions.ConnectionError'> - HTTPSConnectionPool(host='bypyoa.vercel.app', port=443): Max retries exceeded with url: /api/auth?code=daa5ee2d079e8016e999e33df3eea461&bypy_version=1.7.12&redirect_uri=oob (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe71c212700>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
Stack:
File "/usr/local/bin/bypy", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 3815, in main
by = ByPy(**bypyopt)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 468, in init
result = self.__auth()
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 1052, in __auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 882, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 860, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 812, in __request_work
self.__dump_exception(ex, url, pars, r, act)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 615, in __dump_exception
perr(formatex(ex))
File "/usr/local/lib/python3.8/site-packages/bypy/util.py", line 73, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[19:56:12] Function: __server_auth_act
[19:56:12] Website parameters: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
[19:56:12] Maximum number (1) of tries failed.
Vercel server failed, Authorizing with the cloudendpoint server ...
GET https://qcfpba.api.cloudendpoint.cn/auth
actargs: None
Params: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
Full URL: https://qcfpba.api.cloudendpoint.cn/auth?code=daa5ee2d079e8016e999e33df3eea461&bypy_version=1.7.12&redirect_uri=oob
HTTP Status Code: 503
Website returned JSON: {'errorCode': '503SS', 'errorMessage': 'Service Unavailable'}
[19:56:12] Error accessing 'https://qcfpba.api.cloudendpoint.cn/auth'
[19:56:12]
[19:56:12] Function: __server_auth_act
[19:56:12] Website parameters: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
[19:56:12] Full URL: https://qcfpba.api.cloudendpoint.cn/auth?code=daa5ee2d079e8016e999e33df3eea461&bypy_version=1.7.12&redirect_uri=oob
[19:56:12] HTTP Response Status Code: 503
[19:56:12] Website returned: {"errorCode":"503SS","errorMessage":"Service Unavailable"}
[19:56:12] Maximum number (1) of tries failed.
Vercel server failed. Last resort: authorizing with the Aliyun server ...
GET https://8.142.131.12/auth
actargs: None
Params: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
[19:56:19] Error accessing 'https://8.142.131.12/auth'
[19:56:19] Exception:
<class 'requests.exceptions.ConnectionError'> - HTTPSConnectionPool(host='8.142.131.12', port=443): Max retries exceeded with url: /auth?code=daa5ee2d079e8016e999e33df3eea461&bypy_version=1.7.12&redirect_uri=oob (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe71c1aca00>: Failed to establish a new connection: [Errno 110] Connection timed out'))
Stack:
File "/usr/local/bin/bypy", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 3815, in main
by = ByPy(**bypyopt)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 468, in init
result = self.__auth()
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 1052, in __auth
result = self.__get(url, pars, self.__server_auth_act, retry = retry, addtoken = False)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 882, in __get
return self.__request(url, pars, act, 'GET', actargs, retry, addtoken, dumpex, **kwargs)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 860, in __request
result = self.__request_work(url, pars, act, method, actargs, addtoken, dumpex, **kwnew)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 812, in __request_work
self.__dump_exception(ex, url, pars, r, act)
File "/usr/local/lib/python3.8/site-packages/bypy/bypy.py", line 615, in __dump_exception
perr(formatex(ex))
File "/usr/local/lib/python3.8/site-packages/bypy/util.py", line 73, in formatex
type(ex), ex, ''.join(traceback.format_stack()))

[19:56:19] Function: __server_auth_act
[19:56:19] Website parameters: {'code': 'daa5ee2d079e8016e999e33df3eea461', 'bypy_version': '1.7.12', 'redirect_uri': 'oob'}
[19:56:19] Maximum number (1) of tries failed.
[19:56:19] Fatal: All server authorizations failed.
[19:56:19] ----------------------------------------------------------------
[19:56:19] 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.
    Skip saving Hash Cache since it has not been updated.

from bypy.

Thegallophorse avatar Thegallophorse commented on July 26, 2024

image
我测了一下三台服务器的接口,第一台错误码500, 第二台Service Unavailable, 第三台直接访问不到了,希望可以帮忙看一下,没有secretId真的好难搞,我见代码里面secretId是直接写到环境变量里面了,这个值未知的怎么export进去,可以私聊单发一下么,感谢

from bypy.

yisuo2015 avatar yisuo2015 commented on July 26, 2024

我也遇到同样的问题,试了两台电脑都一样,估计授权服务器被qiang了

from bypy.

JuewenPeng avatar JuewenPeng commented on July 26, 2024

可以试试这个 https://blog.csdn.net/qq_39546227/article/details/126603750

from bypy.

ZoidbergPi avatar ZoidbergPi commented on July 26, 2024

同样的问题,另外如果是楼上的方案,还是要走验证服务器的,部署验证服务器之后提示{"error_code": 150, "error_msg": "ERROR: Auth failed, please retry.\nHTTP status code: 400\nDetails: Baidu returned:\nb'{"error":"invalid_client","error_description":"Invalid client_id"}

from bypy.

JuewenPeng avatar JuewenPeng commented on July 26, 2024

我自己试的没什么问题呀

from bypy.

ZoidbergPi avatar ZoidbergPi commented on July 26, 2024

不太清楚,暂时先用另一个替代了:elixonmars/BaiduPCS-Go

from bypy.

houtianze avatar houtianze commented on July 26, 2024

谢谢反馈。最新版1.8应该不会有这个问题了。
之前加了三个服务器,结果字节的服务关停了,阿里的重刷过系统没运行服务,而以前挺稳定的Vercel貌似最近被墙了。。
这次应该算是一次解决这个问题了。

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.