2016-08-29 44 views
1

我正在使用ac2git工具将我的accurev仓库与git存储库进行协调。 在执行命令python ac2git.py后,按照指示here执行必要步骤后,出现以下错误。Winerror 3:使用ac2git找不到文件

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

我不熟悉您正在使用的工具,但它似乎在您所提供的输出片段的最后一行给出了最好的信息:

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个字符,如果“用户”和“应用程序”之间的目录名称足够长,则可能会在Windows中达到256个字符的路径名称限制。

+0

我认为你是对的,它确实超过了限制。我正在寻找可以扩展字符限制的方法,如果这是问题的根源,我的应用程序应该运行良好。 –

+0

我试过git config --system core.longpaths true 我也试着用\\?\ 作为前缀加上限制,但是Im仍然收到相同的错误。任何想法,如果有其他方式? –

+1

我修正了@Mike的问题,因为你指出了什么,深入了解它。深入研究它让我在这里:[http://stackoverflow.com/questions/39274722/using-path-extension-for -windows-7-with-python-script](解决方案) –

相关问题