Skip to content

tuple index out of range #2

Description

@sicenul
  • I'd like to render an image to terminal console. The image is a black and white qrcode
  • Executing this snippet inside python 3.7 script:
from imgrender import render
filename = 'qrcode.png'
render(filename, scale=(256, 256))
  • Resulting in this following error. What is the possibility of this error?
Traceback (most recent call last):
  File "main.py", line 38, in <module>
    render(filename, scale=(256, 256))
  File "/home/yooza/python/wa-notif/env/lib/python3.7/site-packages/imgrender/main.py", line 37, in render
    image = get_image(path)
  File "/home/yooza/python/wa-notif/env/lib/python3.7/site-packages/imgrender/main.py", line 31, in get_image
    if img.shape[2] > 3:
IndexError: tuple index out of range

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions