Closed ldj46118 closed 3 years ago
谢谢提议。已经加入 v0.6.13
中。
@PeterDing 这里貌似改炸掉了……
https://github.com/PeterDing/BaiduPCS-Py/blob/e13b941ef9a8b19b225faf74cade61377a844c7a/baidupcs_py/app/app.py#L402-L415
412行的 assert
应该按 int(i)
而不是 user_index
,因为交互式 su
的时候 user_index
可能为 None
。
或者把直接把这一行移到 if user_index:
的分支去?
@AlexGuo1998 确实炸了 😂
已经在 v0.6.14 修复。
可以打印下面的 p 看看吗。我的帐号没有这个项目。
(话说是 #30 这个 issue 吗)
试了一下 v0.6.14 好像还是不行,在 baidupcs_py/commands/display.py:408
这里就挂掉了,还没跑到 api.py
这里去
如果需要的话我可以提供一下这个账号的 cookie,如何安全的发送给你呢?
我知道了,在 useradd
的时候会调用。是这个:
{
'product_id': '16421998100313934912',
'start_time': 1615737599,
'end_time': 1616342399,
'buy_time': '1613265962',
'cluster': None,
'detail_cluster': None,
'product_name': None,
'status': '0',
'function_num': 0,
'buy_description': '7天免费试用',
'product_description': None
}
useradd
不会调用 display_user_infos
,你应该用的是 userlist
或 su
。
你可以用 updateuser
更新发生错误的用户的信息,再使用 userlist
, su
应该就不会出错了。
上面不是说看一下 user_products
的 p
的输出结果吗……user_products
应该是在更新用户信息/添加用户的时候触发的。
现在 su
确实没有问题了,谢谢。
建议增加 BaiduPCS-Py su 1这样的直接切换用户命令
Prerequisites / 报告前提 Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py. 在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。
At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired. 有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。
Describe the bug / 描述 bug A clear and concise description of what the bug is. 请清楚的描述你遇到的问题。
To Reproduce / 复现问题 Steps to reproduce the behavior:
按照下面的步骤可以复现问题:
Screenshots / 问题截图 If applicable, add screenshots to help explain your problem.
如果可能,请附加问题截图。
Envrionment / 运行环境
Runing log / 运行日志 Please follow steps to paste the content of file
~/.baidupcs-py/running.log
.~/.baidupcs-py/running.log
if it exists.LOG_LEVEL=DEBUG
. e.g.LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
after the bug occurs.请按照下面的步骤贴出运行日志
~/.baidupcs-py/running.log
中的内容。~/.baidupcs-py/running.log
,如果存在。LOG_LEVEL=DEBUG
。 例如:LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
中的内容。Additional context / 补充内容 Add any other context about the problem here. 在这里增加补充内容。