You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed. 注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。
File d:\App\anaconda\envs\baidu\lib\site-packages\baidupcs_py\baidupcs\api.py:322, in BaiduPCSApi.share(self, password, period, *remotepaths)
314 def share(self, *remotepaths: str, password: str, period: int = 0) -> PcsSharedLink:
315 """Share remotepaths to public with a optional password
316
317 To use api, STOKEN must be in cookies
318
319 period (int): The days for expiring. 0 means no expiring
320 """
--> 322 info = self.baidupcs.share(*remotepaths, password=password, period=period)
323 link = PcsSharedLink.from(info)._replace(paths=list(remotepaths), password=password)
324 return link
File d:\App\anaconda\envs\baidu\lib\site-packages\baidupcs_py\baidupcs\errors.py:152, in assert_ok..check(*args, **kwargs)
149 err = parse_errno(error_code)
151 if err:
--> 152 raise err
153 return info
BaiduPCSError: error_code: 2, message: 参数错误
Envrionment / 运行环境
OS: Windows
Python Python3.8
BaiduPCS-Py Version 0.7.6
还请大佬帮忙看下什么问题。
The text was updated successfully, but these errors were encountered:
背景:已经检查时最新版本和最新cookies了
Describe the bug / 描述 bug
在使用share命令后出现:BaiduPCSError: error_code: 2, message: 参数错误
To Reproduce / 复现问题
Screenshots / 问题截图
BaiduPCSError Traceback (most recent call last)
Cell In[58], line 1
----> 1 share_link = baiduapi.share('/database',password='1234',period=2)
File d:\App\anaconda\envs\baidu\lib\site-packages\baidupcs_py\baidupcs\api.py:322, in BaiduPCSApi.share(self, password, period, *remotepaths)
314 def share(self, *remotepaths: str, password: str, period: int = 0) -> PcsSharedLink:
315 """Share
remotepaths
to public with a optional password316
317 To use api,
STOKEN
must be incookies
318
319 period (int): The days for expiring.
0
means no expiring320 """
--> 322 info = self.baidupcs.share(*remotepaths, password=password, period=period)
323 link = PcsSharedLink.from(info)._replace(paths=list(remotepaths), password=password)
324 return link
File d:\App\anaconda\envs\baidu\lib\site-packages\baidupcs_py\baidupcs\errors.py:152, in assert_ok..check(*args, **kwargs)
149 err = parse_errno(error_code)
151 if err:
--> 152 raise err
153 return info
BaiduPCSError: error_code: 2, message: 参数错误
Envrionment / 运行环境
还请大佬帮忙看下什么问题。
The text was updated successfully, but these errors were encountered: