PeterDing / BaiduPCS-Py

BaiduPCS API & App 百度网盘客户端 和 API
MIT License
667 stars 108 forks source link

BaiduPCS-Py save的时候REMOTEDIR路径中有空格怎么处理 #114

Closed miraclemie closed 1 year ago

miraclemie commented 1 year ago

WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed. 注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。

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:

  1. Do '...'
  2. Do '....'
  3. ...
  4. See error

按照下面的步骤可以复现问题:

  1. 做 '...'
  2. 做 '...'
  3. ...
  4. 问题出现

Screenshots / 问题截图 If applicable, add screenshots to help explain your problem.

Don't show BDUSS and cookies.

如果可能,请附加问题截图。

不要出现 BDUSScookies

Envrionment / 运行环境

Runing log / 运行日志 Please follow steps to paste the content of file ~/.baidupcs-py/running.log.

  1. Remove the file ~/.baidupcs-py/running.log if it exists.
  2. Run the command where the bug occurs with envrionment variable LOG_LEVEL=DEBUG. e.g. LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
  3. Paste the content of file ~/.baidupcs-py/running.log after the bug occurs.

Don't show BDUSS and cookies.

请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log 中的内容。

  1. 删除 ~/.baidupcs-py/running.log,如果存在。
  2. 在问题发生的命令前加入环境变量 LOG_LEVEL=DEBUG。 例如:LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
  3. 在问题出现后,贴出 ~/.baidupcs-py/running.log 中的内容。

不要出现 BDUSScookies

Additional context / 补充内容 Add any other context about the problem here. 在这里增加补充内容。

miraclemie commented 1 year ago
1680598317018
PeterDing commented 1 year ago

BaiduPCS-Py save "url" "/path/to/remote directory with space"

miraclemie commented 1 year ago

BaiduPCS-Py save "url" "/path/to/remote directory with space"

1680599542635

我这个在命令行中执行是没有问题的,但是通过subprocess的管道运行就是会把空格前面的给忽略掉

PeterDing commented 1 year ago
import subprocess

cmd = [
    "BaiduPCS-Py", "save", "-p", "pass", "url", "/path/to/remote directory with space"
]

subprocess.call(cmd)
miraclemie commented 1 year ago
import subprocess

cmd = [
    "BaiduPCS-Py", "save", "-p", "pass", "url", "/path/to/remote directory with space"
]

subprocess.call(cmd)

可以了,感谢