A user in the SNESdev Discord server is having trouble running 816-opt.py in Python 3. When building "likemario" from the PVSnesLib examples, the user ran into this error:
$ 816-opt.py LikeMario.ps >LikeMario.asp
Traceback (most recent call last):
File "../../../devkitsnes/bin/816-opt.py", line 14, in <module>
text_raw = open(sys.argv[1],'r').readlines()
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 509: invalid continuation byte
I looked at the 816-opt.py script, and it appears to be written for Python 2, not Python 3. The open() function in Python 3 returns Unicode strings, not byte strings as in Python 2. Security updates for Python 2 ended on January 1, 2020.
How practical would it be to port 816-opt.py to Python 3?
A user in the SNESdev Discord server is having trouble running
816-opt.pyin Python 3. When building "likemario" from the PVSnesLib examples, the user ran into this error:I looked at the
816-opt.pyscript, and it appears to be written for Python 2, not Python 3. Theopen()function in Python 3 returns Unicode strings, not byte strings as in Python 2. Security updates for Python 2 ended on January 1, 2020.How practical would it be to port
816-opt.pyto Python 3?