Open chenyichie opened 2 years ago
Yes this is a Python 2 project. PjOrion is Python 2 as I'm aware. No idea about the recent versions of PjOrion though.
So, is this error related to python2?
You have to use Python 2 to run the project. Won't work with Python 3.
The error is related to difference between bytes and strings in between Python 2 & 3.
I'm using wsl 22.04, and run "python3 main.py --ifile=main.pyc --ofile=mainfixed.pyc", then get this error:
INFO:main:Opening file main.pyc Traceback (most recent call last): File "/home/user/bytecode_simplifier/main.py", line 72, in
process(args.ifile, args.ofile)
File "/home/user/bytecode_simplifier/main.py", line 52, in process
if not header.startswith('\x03\xF3\x0D\x0A'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
I'm using python3, is this a python2 project?