Winerror 3:使用ac2git找不到文件

时间:2016-08-29 17:28:27

标签: python git accurev

我正在使用ac2git工具将我的accurev depot与git存储库进行协调。 按照指示here执行必要的步骤后,运行命令 python ac2git.py 时出现以下错误。

2016-08-29 09:54:14,058 - ac2git - ERROR - The script has encountered an exception, aborting!
Traceback (most recent call last):
File "ac2git.py", line 3596, in AccuRev2GitMain
rv = state.Start(isRestart=args.restart, isSoftRestart=args.softRestart)
File "ac2git.py", line 2974, in Start
self.RetrieveStreams()
File "ac2git.py", line 1556, in RetrieveStreams
tr, commitHash = self.RetrieveStream(depot=depot, stream=streamInfo,dataRef=dataRef, stateRef=stateRef, hwmRef=hwmRef, startTransaction=self.config.accurev.startTransaction, endTransaction=endTr.id)
File "ac2git.py", line 1511, in RetrieveStream
dataTr,  dataHash  = self.RetrieveStreamData(stream=stream, dataRef=dataRef,stateRef=stateRef)
File "ac2git.py", line 1394, in RetrieveStreamData
commitHash = self.Commit(transaction=tr, allowEmptyCommit=True,messageOverride="transaction {trId}".format(trId=tr.id), parents=[], ref=dataRef)
File "ac2git.py", line 670, in Commit
self.PreserveEmptyDirs()
File "ac2git.py", line 440, in PreserveEmptyDirs
if git.GetGitDirPrefix(path) is None and len(os.listdir(path)) == 0:
FileNotFoundError: [WinError 3] The system cannot find the path specified:'C:///Users/*****/*****/app/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list'

错误非常模糊,我似乎无法找到有关此工具的任何文档,可以帮助解决错误。以前有人遇到过这个问题吗?

1 个答案:

答案 0 :(得分:1)

我不熟悉您正在使用的工具,但似乎您提供的输出摘录中的最后一行提供了最佳信息:

FileNotFoundError: [WinError 3] The system cannot find the path specified:'C:///Users/*****/*****/app/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list'

使用在文件系统中无效的额外斜杠和目录名称,该路径看起来格式不正确。此外,输出中的文件路径为227个字符,如果“Users”和“app”之间的目录名称足够长,则可能会在Windows中达到256个字符的路径名限制。