dloscutoff/ascii-piet

I am a noob

senya1111 opened this issue · 1 comments

I tired running the following command and got the following output.

python3 ascii2piet.py test.txt > test.png
Traceback (most recent call last):
File "ascii2piet.py", line 203, in
img = ascii_to_image(ascii_piet, options.size, verbose=options.verbose)
File "ascii2piet.py", line 122, in ascii_to_image
img = img.resize((real_width, real_height), resample=Image.Dither.NONE)
File "/home/####/.local/lib/python3.8/site-packages/PIL/Image.py", line 62, in getattr
raise AttributeError("module '{}' has no attribute '{}'".format(name, name))
AttributeError: module 'PIL.Image' has no attribute 'Dither'

Was wondering if you knew the solution??

My guess is you've got an older version of Pillow. Try updating it and see if that helps. Or, you can instead try using this commit of ASCII-Piet, which uses Image.NEAREST (an older approach, now deprecated) instead of Image.Dither.NONE.

Thanks for your interest, BTW!