sedthh / pyxelate

Python class that generates pixel art from images
MIT License
1.58k stars 108 forks source link

ValueError when starting with a single file in current directory #8

Closed NilsKrause closed 4 years ago

NilsKrause commented 4 years ago

When pyx.py is used with just a single input file in the current directory, i.e.:

python3 pyx.py -i myimage.png

following error is thrown:

Traceback (most recent call last):
  File "pyx.py", line 222, in <module>
    i_path, i_base = str(input_dir).rsplit('/', 1)
ValueError: not enough values to unpack (expected 2, got 1)

You shouldn't expect the user to always use absolut paths. PS:

python3 pyx.py -i ./myimage.png

isn't working eigther.