JuanPotato/Legofy

Unable to convert - NotADirectoryError

Closed this issue · 2 comments

I am trying to convert an image and getting this error

$ legofy wait-what.jpg 
Static image detected, will now legofy and save as /lego_wait-what.png
Traceback (most recent call last):
  File "/home/anand/.virtualenvs/3/bin/legofy", line 9, in <module>
    load_entry_point('legofy==0.0.1', 'console_scripts', 'legofy')()
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/click-5.1-py3.4.egg/click/core.py", line 700, in __call__
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/click-5.1-py3.4.egg/click/core.py", line 680, in main
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/click-5.1-py3.4.egg/click/core.py", line 873, in invoke
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/click-5.1-py3.4.egg/click/core.py", line 508, in invoke
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/legofy-0.0.1-py3.4.egg/legofy/cli.py", line 14, in main
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/legofy-0.0.1-py3.4.egg/legofy/__init__.py", line 131, in main
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/legofy-0.0.1-py3.4.egg/legofy/__init__.py", line 67, in makeLegoImage
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/legofy-0.0.1-py3.4.egg/legofy/__init__.py", line 54, in makeLegoBrick
  File "/home/anand/.virtualenvs/3/lib/python3.4/site-packages/PIL/Image.py", line 2249, in open
    fp = builtins.open(filename, "rb")
NotADirectoryError: [Errno 20] Not a directory: '/home/anand/.virtualenvs/3/lib/python3.4/site-packages/legofy-0.0.1-py3.4.egg/legofy/bricks/brick.png'

This should be fixed, please try with the newest code.

Yep, its working.

Thank you @JuanPotato