VMTranslator passes on own computer, but fails on grader

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VMTranslator passes on own computer, but fails on grader

A_Random_Person

When I run my VMTranslator on my personal computer, it passes all the test. However, when I submit it, it fails unexpectedly. Here is what the grader spat at me:
*(-15) - The submitted VMTranslator failed to translate FibonacciElement
*(-15) - The submitted VMTranslator failed to translate NestedCall
*(-15) - The submitted VMTranslator failed to translate StaticsTest
LOG:
Archive: /shared/submission/project8.zip
inflating: project/call.asm
inflating: project/cmpArithmetic.asm
inflating: project/function.asm
inflating: project/goto.asm
inflating: project/if.asm
extracting: project/init.asm
extracting: project/label.asm
extracting: project/lang.txt
extracting: project/oneArgArithmetic.asm
extracting: project/popMem.asm
inflating: project/popSeg.asm
extracting: project/popStatic.asm
inflating: project/pushConst.asm
inflating: project/pushMem.asm
inflating: project/pushSeg.asm
inflating: project/pushStatic.asm
inflating: project/return.asm
inflating: project/twoArgArithmetic.asm
inflating: project/VMTranslator.asm
inflating: project/VMTranslator.py
checking /shared/submission/project8.zip
chmod +x VMTranslator
Traceback (most recent call last):
File "VMTranslator.py", line 277, in <module>
main(argv[1])
File "VMTranslator.py", line 269, in main
writer = CodeWriter(os.path.join(src, "%s.asm" % os.path.basename(os.path.dirname(src))))
File "VMTranslator.py", line 92, in __init__
self.outFile = open(outFile, "w")
FileNotFoundError: [Errno 2] No such file or directory: 'FibonacciElement\\/.asm'
Traceback (most recent call last):
File "VMTranslator.py", line 277, in <module>
main(argv[1])
File "VMTranslator.py", line 269, in main
writer = CodeWriter(os.path.join(src, "%s.asm" % os.path.basename(os.path.dirname(src))))
File "VMTranslator.py", line 92, in __init__
self.outFile = open(outFile, "w")
FileNotFoundError: [Errno 2] No such file or directory: 'NestedCall\\/.asm'
Traceback (most recent call last):
File "VMTranslator.py", line 277, in <module>
main(argv[1])
File "VMTranslator.py", line 269, in main
writer = CodeWriter(os.path.join(src, "%s.asm" % os.path.basename(os.path.dirname(src))))
File "VMTranslator.py", line 92, in __init__
self.outFile = open(outFile, "w")
FileNotFoundError: [Errno 2] No such file or directory: 'StaticsTest\\/.asm'
The output file should be VMDirectoryName/VMDirectoryName.asm, but on the grader the VMDirectoryName.asm turns into /.asm. Why is this happening, and how do I fix it? I've already tried running the VMTranslator on another computer, but it still works.
Ɛ==(  ̄皿 ̄)==3

Reply | Threaded
Open this post in threaded view
|

Re: VMTranslator passes on own computer, but fails on grader

WBahn
Administrator
A likely candidate is that one of you is running on a Windows machine and the other is running on a Linux machine (or possibly a Mac). Are you using the operating-system agnostic file and directory utilities, particularly with regard to path separators?

Another possibility is that there is a disconnect on what directory you each are running the program from.

I would recommend having a discussion with the grader to home in on the exact situation that results in the problem.