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

UnicodeDecodeError #14

Open
MalcontentLout opened this issue Sep 24, 2017 · 3 comments
Open

UnicodeDecodeError #14

MalcontentLout opened this issue Sep 24, 2017 · 3 comments

Comments

@MalcontentLout
Copy link

Whenever trying to decode an image, I get UnicodeDecodeError: 'ascii' codec can't decode byte 0x8a in position 0: ordinal not in range(128) from line 166 (output += chr(int(self.read_byte(),2)).encode("utf-8")). The problematic byte changes depending on the image. This happens whenever the format of the carrier is a bmp or png and the file is an image. Text can be successful encoded and decoded, but images produce this error during extraction. By importing and reseting sys with default encoding as UTF8, the error persists as a UnicodeDecodeError but with UTF-8 codec unable to decode the byte because of an invalid start byte instead.

@ghost
Copy link

ghost commented Oct 23, 2017

Which Python version are you using?
I only get the error when using Python 2, no error with Python 3.

@RobinDavid
Copy link
Owner

I am use python3. Is using python 2 mandatory for you ?

@MalcontentLout
Copy link
Author

I am using python 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