3ds_monty
3ds_monty copied to clipboard
SyntaxError, Even When There Shouldn't Be One
I'm having an issue running a program with the interpreter using the netloader. I've been trying to run a program, but whenever I try to run it from a .zip file, it returns:
Traceback (most recent call last):
File "zip:/test1.py", line 1
SyntaxError: invalid syntax
Here is the code:
from citrus import *
gfx.init_default()
console.init(gfx.SCREEN_TOP)
print("Hello, world!")
while apt.main_loop():
hid.scan_input()
if hid.keys_down() and hid.KEY_START:
break
gfx.flush_buffers()
gfx.swap_buffers()
gsp.wait_for_vblank()
I have the boot file included in the zip, and have double-checked that it points to the right file.
I should note that the program runs fine when only the .py file is sent. It's only when it's packaged in a .zip does the interpreter act up.
Could this be an issue with encoding? I checked both my Python script and the one used in the examples, but the format used by different editors mess up the interpreter? Or am I simply using the .zip files incorrectly?
Are you compressing the ZIP file? Unfortunately, libzipfs only supports storage ZIP's at the moment.
I'm pretty sure I'm compressing the .zip correctly (using the zip command-line utility for Linux). I ask since Google yielded no adequate answers, but what is the distinction between a storage zip and a normal zip file?
Try making an uncompressed ZIP