Open ghost opened 4 years ago
+1
yup
We need this fixed, here is more information
In the command window the following appear
~$ python /home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/out\vTbgenerator.py /home/stefan/Dokument/project/LEDDriver/LEDDriver.sv
python: can't open file '/home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/outvTbgenerator.py': [Errno 2] No such file or directory
As pointed out before the \ after "-testbench-instance-0.0.5/out" should be changed into a /
Further more, If the path is corrected and entered in the command window the following appear.
~$ python /home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/out/vTbgenerator.py /home/stefan/Dokument/project/LEDDriver/LEDDriver.sv
Traceback (most recent call last):
File "/home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/out/vTbgenerator.py", line 224, in <module>
writeTestBench(sys.argv[1])
File "/home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/out/vTbgenerator.py", line 153, in writeTestBench
with open(input_file, encoding=f_encoding) as inFile:
TypeError: 'encoding' is an invalid keyword argument for this function
There is a fox described here https://github.com/truecrab/VSCode_Extension_Verilog/issues/2
but it does not solve the second problem, a change to the python script /home/stefan/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/out/vTbgenerator.py
line 224, change from " with open(input_file, encoding=f_encoding) as inFile:"
to " with open(input_file) as inFile:"
Then it at least output something
For this issue: Modify the corresponding code in the file:~/.vscode-server/extensions/truecrab.verilog-testbench-instance-0.0.5/out/extension.js
line 23: ter1.sendText(python ${__dirname}/vInstance_Gen.py ${editor.document.fileName}
);
line 36 :ter1.sendText(python ${__dirname}/vTbgenerator.py ${editor.document.fileName}
);
For this issue:
Just need to modify \\ to // , as follows:
ter1.sendText(python ${__dirname}//vTbgenerator.py ${editor.document.fileName}
);
I have fixed the bug of wrong execution path under different operating systems, and commit it.
python: can't open file '/home/helio/.vscode/extensions/truecrab.verilog-testbench-instance-0.0.5/outvTbgenerator.py': [Errno 2] No such file or directory