2016-08-29 45 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](解決方案) –

相關問題