Open
Conversation
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/media/alejandro/9eafe6e5-7fd3-4333-bea8-513fc3fd6c09/workon/test/python-epson-printer/epson_printer/testpage.py", line 41, in <module>
printer.print_image_from_file("logo.png")
File "epson_printer/epsonprinter.py", line 279, in print_image_from_file
printable_image = PrintableImage.from_image(image)
File "epson_printer/epsonprinter.py", line 135, in from_image
pixels = pixels.reshape(nb_stripes, 24, w).swapaxes(1, 2).reshape(-1, 8)
TypeError: 'float' object cannot be interpreted as an index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/media/alejandro/9eafe6e5-7fd3-4333-bea8-513fc3fd6c09/workon/test/python-epson-printer/epson_printer/testpage.py", line 41, in
printer.print_image_from_file("logo.png")
File "epson_printer/epsonprinter.py", line 279, in print_image_from_file
printable_image = PrintableImage.from_image(image)
File "epson_printer/epsonprinter.py", line 135, in from_image
pixels = pixels.reshape(nb_stripes, 24, w).swapaxes(1, 2).reshape(-1, 8)
TypeError: 'float' object cannot be interpreted as an index