gpt4 book ai didi

batch-file - 为什么此 gsutil 调用在 FinalBuilder 网站上不起作用,但在 FinalBuilder 应用程序中运行时有效?

转载 作者:行者123 更新时间:2023-12-03 21:09:58 25 4
gpt4 key购买 nike

我有一个 .bat 文件,它调用以下 gsutil 将文件推送到 Google Cloud:

python "C:\Program Files (x86)\gsutil\gsutil" -D -m cp -a public-read C:\Temp\MyMSI.msi gs://downloads-gs.mywebsite.com/binaries/myapplication/auto_installer/

这是我的输出(为了模糊起见更改了一些名称):

----------------------------------------------------------
Copy to google 11:02:33 AM 11:02:34 AM 00:00:00:479 Failed (Ignored)
Collapse Messages
Messages
Collapse
Executing external process: C:\Windows\system32\cmd.exe

Starting Directory: C:\BuildScripts
Parameters: /c "c:\buildscripts\push_goog.bat"
Collapse
Output from C:\Windows\system32\cmd.exe

The system cannot find the drive specified.

C:\BuildScripts>pushd c:\BuildScripts\

The system cannot find the drive specified.
Traceback (most recent call last):
File "C:\Program Files (x86)\gsutil\gsutil", line 67, in <module>
from gslib.util import UsingCrcmodExtension
File "C:\Program Files (x86)\gsutil\gslib\util.py", line 121, in <module>
os.path.join(CreateTrackerDirIfNeeded(), '.last_software_update_check'))
File "C:\Program Files (x86)\gsutil\gslib\util.py", line 108, in CreateTrackerDirIfNeeded
os.makedirs(tracker_dir)
File "C:\Python27\lib\os.py", line 150, in makedirs
makedirs(head, mode)
**C:\BuildScripts>python "C:\Program Files (x86)\gsutil\gsutil" -D -m cp -a public-read C:\Temp\MyMSI.msi gs://downloads-gs.mywebsite.com/binaries/myapplication/auto_installer/**
File "C:\Python27\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 3] The system cannot find the path specified: 'H:\\\\'
Program returned code : 1

它提到了一些关于 H:\\\\的内容,我们没有使用,也从未在 .bat 文件或 gsutil 的参数中提及。我不确定为什么它在从 FinalBuilder 应用程序运行时完美运行,然后在 FinalBuilder 网站运行相同的 FinalBuilder 应用程序文件但只是通过 FinalBuilder 服务器触发时出现此错误。

任何帮助都会很棒。

最佳答案

根本原因是您的主目录设置为无效位置。

作为解决方法,您可以更改 .boto 配置文件中的跟踪器目录。这是相关部分:

[GSUtil]
# 'resumable_tracker_dir' specifies the base location where resumable
# transfer tracker files are saved. By default they're in ~/.gsutil
#resumable_tracker_dir = <file path>

取消注释 resumable_tracker_dir 变量并将其设置为磁盘上确实存在的位置。

关于batch-file - 为什么此 gsutil 调用在 FinalBuilder 网站上不起作用,但在 FinalBuilder 应用程序中运行时有效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20247458/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com