2012-12-24 49 views
1
Traceback (most recent call last): 
    File "scripts/rule_bison.py", line 75, in <module> 
    return Code = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp]) 
    File "/usr/lib/python2.7/subprocess.py", line 493, in call 
    return Popen(*popenargs, **kwargs).wait() 
    File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ 
    errread, errwrite) 
    File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child 
    raise child_exception 
OSError: [Errno 2] No such file or directory 

我想使用忍者來建立鉻源代碼。然後我得到了上面的錯誤。我不知道如何弄清楚。你能給我任何想法嗎?建設鉻,subprocess.call拋出錯誤「沒有這樣的文件或目錄」

回答

3

這意味着無論發現變量bisonExe命名的二進制文件都沒有找到。該Errno 2錯誤將被拋出任何不存在的二進制文件:

>>> subprocess.call(['spamandeggs', '-V']) 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call 
    return Popen(*popenargs, **kwargs).wait() 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__ 
    errread, errwrite) 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child 
    raise child_exception 
OSError: [Errno 2] No such file or directory 
+1

謝謝你的建議,馬亭Pieters.My的Ubuntu沒有安裝野牛。我已經安裝了野牛,現在好了,:) – dreamevil

相關問題