Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError #10

Open
chenyichie opened this issue Sep 16, 2022 · 3 comments
Open

TypeError #10

chenyichie opened this issue Sep 16, 2022 · 3 comments

Comments

@chenyichie
Copy link

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?

@extremecoders-re
Copy link
Owner

Yes this is a Python 2 project. PjOrion is Python 2 as I'm aware. No idea about the recent versions of PjOrion though.

@chenyichie
Copy link
Author

So, is this error related to python2?

@extremecoders-re
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants