houtianze / bypy

Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘Python客户端
MIT License
7.79k stars 1.39k forks source link

一直等待 #675

Open tengjjj opened 7 months ago

tengjjj commented 7 months ago

4PYRKBJHFQ)I9K FW A`QUY 授权后一直等待,使用bypy info 后仍是等待,无法使用

houtianze commented 7 months ago

可能是升级信息页被屏蔽了,你帮我:

tengjjj commented 7 months ago

image image 两个链接都能访问

houtianze commented 7 months ago

谢谢反馈。百度那边返回的是503,是服务端错误,重试无用。这个没办法了,只能等百度修复。

riddlevv commented 7 months ago

我也遇到了同样的问题,请问您现在可以正常使用了嘛?

cheney369 commented 5 months ago

@houtianze 快四月了,依旧不能使用。

houtianze commented 5 months ago

@cheney369 你贴下bypy -dv info的输出,是同样的错误吗?

cheney369 commented 5 months ago

@houtianze

root@pt_exp:/data/llamacpp# bypy -dv info
<D> 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.121:8443/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.121:8443/refresh', False, 'Vercel server failed. Last resort: refreshing with the Aliyun server ...']]}
<D> [05:41:43] Using requests.packages.urllib3 to disable warnings
<D> [05:41:43] Using urllib3 to disable warnings
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
----

<D> Error while loading baidu pcs token.
Exception:
<class 'FileNotFoundError'> - [Errno 2] No such file or directory: '/root/.bypy/bypy.json'
Stack:
  File "/usr/local/bin/bypy", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 3820, in main
    by = ByPy(**bypyopt)
  File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 466, in __init__
    if not self._load_local_json():
  File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 942, in _load_local_json
    self.pd("Error while loading baidu pcs token.\n{}".format(formatex(ex)))
  File "/usr/local/lib/python3.8/dist-packages/bypy/util.py", line 73, in formatex
    type(ex), ex, ''.join(traceback.format_stack()))

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

<D> auth_code: 
Authorizing, please be patient, it may take upto 300 seconds...
<D> POST https://openapi.baidu.com/oauth/2.0/token
<D> actargs: None
<D> Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<D> Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<D> HTTP Status Code: 400
<D> Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'}
<E> [05:41:54] Error accessing 'https://openapi.baidu.com/oauth/2.0/token'
<E> [05:41:54] 
<E> [05:41:54] Function: _local_auth_act
<E> [05:41:54] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<E> [05:41:54] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<E> [05:41:54] HTTP Response Status Code: 400
<E> [05:41:54] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"}

<E> [05:41:54] Waiting 10 seconds before retrying...
<E> [05:42:04] Request Try #2 / 5
<D> POST https://openapi.baidu.com/oauth/2.0/token
<D> actargs: None
<D> Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<D> Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<D> HTTP Status Code: 400
<D> Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'}
<E> [05:42:04] Error accessing 'https://openapi.baidu.com/oauth/2.0/token'
<E> [05:42:04] 
<E> [05:42:04] Function: _local_auth_act
<E> [05:42:04] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<E> [05:42:04] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<E> [05:42:04] HTTP Response Status Code: 400
<E> [05:42:04] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"}

<E> [05:42:04] Waiting 20 seconds before retrying...
<E> [05:42:24] Request Try #3 / 5
<D> POST https://openapi.baidu.com/oauth/2.0/token
<D> actargs: None
<D> Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<D> Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<D> HTTP Status Code: 400
<D> Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'}
<E> [05:42:24] Error accessing 'https://openapi.baidu.com/oauth/2.0/token'
<E> [05:42:24] 
<E> [05:42:24] Function: _local_auth_act
<E> [05:42:24] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'}
<E> [05:42:24] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob
<E> [05:42:24] HTTP Response Status Code: 400
<E> [05:42:24] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"}
houtianze commented 5 months ago

你没有粘贴授权码。

On Fri, Mar 29, 2024 at 1:44 PM rayChen @.***> wrote:

@houtianze https://github.com/houtianze

@.***_exp:/data/llamacpp# bypy -dv info

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.121:8443/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.121:8443/refresh', False, 'Vercel server failed. Last resort: refreshing with the Aliyun server ...']]} [05:41:43] Using requests.packages.urllib3 to disable warnings [05:41:43] Using urllib3 to disable warnings 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: - [Errno 2] No such file or directory: '/root/.bypy/bypy.json' Stack: File "/usr/local/bin/bypy", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 3820, in main by = ByPy(**bypyopt) File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 466, in __init__ if not self._load_local_json(): File "/usr/local/lib/python3.8/dist-packages/bypy/bypy.py", line 942, in _load_local_json self.pd("Error while loading baidu pcs token.\n{}".format(formatex(ex))) File "/usr/local/lib/python3.8/dist-packages/bypy/util.py", line 73, in formatex type(ex), ex, ''.join(traceback.format_stack())) 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 auth_code: Authorizing, please be patient, it may take upto 300 seconds... POST https://openapi.baidu.com/oauth/2.0/token actargs: None Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob HTTP Status Code: 400 Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'} [05:41:54] Error accessing 'https://openapi.baidu.com/oauth/2.0/token' [05:41:54] [05:41:54] Function: _local_auth_act [05:41:54] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} [05:41:54] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob [05:41:54] HTTP Response Status Code: 400 [05:41:54] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"} [05:41:54] Waiting 10 seconds before retrying... [05:42:04] Request Try #2 / 5 POST https://openapi.baidu.com/oauth/2.0/token actargs: None Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob HTTP Status Code: 400 Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'} [05:42:04] Error accessing 'https://openapi.baidu.com/oauth/2.0/token' [05:42:04] [05:42:04] Function: _local_auth_act [05:42:04] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} [05:42:04] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob [05:42:04] HTTP Response Status Code: 400 [05:42:04] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"} [05:42:04] Waiting 20 seconds before retrying... [05:42:24] Request Try #3 / 5 POST https://openapi.baidu.com/oauth/2.0/token actargs: None Params: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob HTTP Status Code: 400 Website returned JSON: {'error': 'invalid_request', 'error_description': 'The request is missing a required parameter'} [05:42:24] Error accessing 'https://openapi.baidu.com/oauth/2.0/token' [05:42:24] [05:42:24] Function: _local_auth_act [05:42:24] Website parameters: {'grant_type': 'authorization_code', 'code': '', 'client_id': 'q8WE4EpCsau1oS0MplgMKNBn', 'client_secret': 'PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD', 'redirect_uri': 'oob'} [05:42:24] Full URL: https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=&client_id=q8WE4EpCsau1oS0MplgMKNBn&client_secret=PA4MhwB5RE7DacKtoP2i8ikCnNzAqYTD&redirect_uri=oob [05:42:24] HTTP Response Status Code: 400 [05:42:24] Website returned: {"error":"invalid_request","error_description":"The request is missing a required parameter"} — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned.Message ID: ***@***.***>