cyrildiagne / ar-cutpaste

Cut and paste your surroundings using AR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PIL.UnidentifiedImageError: cannot identify image file 'cut_mask.png'

krkaran12-dev opened this issue · comments

I tried un-installing PIL and re-installing it. I tried saving another local cut_mask image and then convert it.
In any case I am unable to resolve this issue

File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask_cors\extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask_compat.py", line 39, in reraise raise value File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "C:\Users\krkar\Downloads\Compressed\ar-cutpaste-master\server\src\main.py", line 89, in save mask = Image.open('cut_mask.png').convert("L") File "C:\Users\krkar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PIL\Image.py", line 2968, in open "cannot identify image file %r" % (filename if filename else fp) PIL.UnidentifiedImageError: cannot identify image file 'cut_mask.png'

the path in code is wrong for Windows. fix it or try to use Linux :)