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

Error when canvas is blank #5

Closed
fikr4n opened this issue May 4, 2014 · 1 comment
Closed

Error when canvas is blank #5

fikr4n opened this issue May 4, 2014 · 1 comment

Comments

@fikr4n
Copy link

fikr4n commented May 4, 2014

I got this when running image2term.py from examples.

Traceback (most recent call last):
  File "image2term.py", line 107, in <module>
    __main__()
  File "image2term.py", line 102, in __main__
    args['output'].write(image2term(args['image'], args['threshold'], args['ratio']))
  File "image2term.py", line 66, in image2term
    return can.frame()
  File "/tmp/drawille/examples/drawille.py", line 403, in frame
    return self.line_ending.join(self.rows())
  File "/tmp/drawille/examples/drawille.py", line 354, in rows
    minrow = min(self.pixels.keys())
ValueError: min() arg is an empty sequence

I tried to inspect and conclude that it was because the (default) threshold causes the image become blank. I also tried to do a simple run by creating a Canvas() and call frame(). The result was the same, so that I conclude that a blank canvas leads to an error.

@asciimoo
Copy link
Owner

asciimoo commented May 4, 2014

Thanks, fixed ( 8df28b2 )

@asciimoo asciimoo closed this as completed May 4, 2014
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