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

Image printing error in Python 3, use bytearray() #27

Open
adamhrv opened this issue Sep 26, 2017 · 0 comments
Open

Image printing error in Python 3, use bytearray() #27

adamhrv opened this issue Sep 26, 2017 · 0 comments

Comments

@adamhrv
Copy link

adamhrv commented Sep 26, 2017

Thanks for building this. Printing in python2.7 works great.
But in python3 the image printing did not output an image.

It seems the chr() function incorrectly encodes integers to bytes in python3.

Replacing the write_bytes function with the following works in python3:

def write_bytes(self, byte_array):
        msg = bytearray(byte_array)
        self.write(msg)
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

1 participant