-
Notifications
You must be signed in to change notification settings - Fork 7
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
UnicodeEncodeError when writing to log #1
Comments
Hey @mrihtar - Can you share the binary that caused the UnicodeEncodeError? Or the full traceback? |
The suggested fix looks straight forward enough, but it would be good to reproduce the problem before trying to fix it. @mrihtar as @neil-orans suggested, if you can share a binary or even the hash of a binary (more than one would be even better) that we can download from VirusTotal that will cause the UnicodeEncodeError, that would be very helpful so that we can reproduce the problem, and also verify that the update actually fixes it. |
I've uploaded the binary to VirusTotal, hash 6831bcc0f71ad753a0d829a95fbdc55ea392830cd9a999052362bc6d42fc3d67
|
Thanks for sharing that file. I am not getting that error when testing within docker containers built from the python:3.9.2 or python:3.9.6 docker images. I'll try to set up a Windows test environment to see if I can reproduce the error there. Are you using Windows 10 with python 3.9.4? Also, what versions of python-xdis and uncompyle6 are you using? Based on the testing I've done so far, even without the UnicodeEncodeError, unfreezing this file might also require some updates to uncompyle6 and/or xdis rocky/python-uncompyle6#355 rocky/python-uncompyle6#353 rocky/python-uncompyle6#331 |
I am using Windows 10 21H1, python 3.9.6 x64 (just updated), xdis 5.0.11 and uncompyle6 3.7.4. I have also environment variable PYTHONIOENCODING=utf-8 . With this setup I am still getting this error, but not with my fix. Regarding your second remark: for the final decompile (from .pyc) I am using pycdc (manually). |
i am decompiling a python package written in 3.7, running pydecipher in 3.12, and its working except for this error. where do i find that line that needs to be encoded to prevent the error? I know that the author of the code is enthusiastic about including unicode characters that i often run into issues hitting with a print statement without encoding to utf-8 first i have found the source of the error here in the bytecode.py file, but i have no idea how to validate the content to remove non-encodable chars: |
Suggested solution: add encoding parameter to log open - main.py, line 258
The text was updated successfully, but these errors were encountered: