Comments (10)
我同样遇到这个问题,我觉得是服务器崩了,希望作者能搭回去
from bypy.
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.
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:
- 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.
Skip saving Hash Cache since it has not been updated.
from bypy.
我测了一下三台服务器的接口,第一台错误码500, 第二台Service Unavailable, 第三台直接访问不到了,希望可以帮忙看一下,没有secretId真的好难搞,我见代码里面secretId是直接写到环境变量里面了,这个值未知的怎么export进去,可以私聊单发一下么,感谢
from bypy.
我也遇到同样的问题,试了两台电脑都一样,估计授权服务器被qiang了
from bypy.
可以试试这个 https://blog.csdn.net/qq_39546227/article/details/126603750
from bypy.
同样的问题,另外如果是楼上的方案,还是要走验证服务器的,部署验证服务器之后提示{"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.
我自己试的没什么问题呀
from bypy.
不太清楚,暂时先用另一个替代了:elixonmars/BaiduPCS-Go
from bypy.
谢谢反馈。最新版1.8应该不会有这个问题了。
之前加了三个服务器,结果字节的服务关停了,阿里的重刷过系统没运行服务,而以前挺稳定的Vercel貌似最近被墙了。。
这次应该算是一次解决这个问题了。
from bypy.
Related Issues (20)
- 响应码200但是无内容 HOT 1
- Option to suppress warning on windows
- 不能通过授权 HOT 3
- 一直等待 HOT 8
- upload有错误,已登录 HOT 4
- upload开了会员,依然被限速 HOT 3
- You need to authorize this program before using any PCS functions. HOT 1
- 更新最新版本后,一直出现错误提示 HOT 1
- syncup失败 HOT 4
- syncup前后文件名和文件大小一致,但因md5校验码不同被判定为不同文件 HOT 1
- Questions about Copilot + Open Source Software Hierarchy
- 每次上传要报错一次,不知道有没有影响 HOT 3
- 一直授权不成功,http error, 贴出了bypy -dv info HOT 1
- Error accessing 'https://pcs.baidu.com/rest/2.0/pcs/file' HOT 3
- 授权不成功 HOT 1
- Trigger security policy 错误 HOT 1
- 无法获得授权 HOT 1
- 无法调用bypy info命令 HOT 11
- bypy info 绑定失败 HOT 1
- 执行两次一样的上传命令会导致文件被删除 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bypy.