UnidentifiedImageError
camenduru opened this issue · 3 comments
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 456, in call_prediction
output = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1520, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1303, in preprocess_data
processed_input.append(block.preprocess(inputs_cached))
File "/usr/local/lib/python3.10/dist-packages/gradio/components/image.py", line 159, in preprocess
im = _Image.open(payload.path)
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 3283, in open
PIL.UnidentifiedImageError: cannot identify image file '/tmp/gradio/24aa92b118ebf844de8a0eb8ed68814f5df1a21d/Screenshot 2023-11-22 181236.jpg'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 456, in call_prediction
output = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1520, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1303, in preprocess_data
processed_input.append(block.preprocess(inputs_cached))
File "/usr/local/lib/python3.10/dist-packages/gradio/components/image.py", line 159, in preprocess
im = _Image.open(payload.path)
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 3283, in open
PIL.UnidentifiedImageError: cannot identify image file '/tmp/gradio/24aa92b118ebf844de8a0eb8ed68814f5df1a21d/Screenshot 2023-11-22 181236.jpg'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 501, in process_events
response = await self.call_prediction(awake_events, batch)
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 465, in call_prediction
raise Exception(str(error) if show_error else None) from error
Exception: cannot identify image file '/tmp/gradio/24aa92b118ebf844de8a0eb8ed68814f5df1a21d/Screenshot 2023-11-22 181236.jpg'
getting same error
Please use 1024x576 JPG or PNG images.
use 1024x576 jpeg image, getting same error too