Skip to content

PIL.UnidentifiedImageError: cannot identify image file #104

@S-hdyn

Description

@S-hdyn

I got this error while vcsi running:

  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\Scripts\vcsi.exe\__main__.py", line 7, in <module>
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\__init__.py", line 3, in main
    vcsi.vcsi.main()
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 1636, in main
    process_file_or_ignore(filename, args)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 1610, in process_file_or_ignore
    process_file(filepath, args)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 1764, in process_file
    selected_frames, temp_frames = select_sharpest_images(media_info, media_capture, args)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 740, in select_sharpest_images
    frame = do_capture(timestamp_tuple, desired_size[0], desired_size[1], suffix, args)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 700, in do_capture
    blurriness = media_capture.compute_blurriness(filename)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\vcsi\vcsi.py", line 596, in compute_blurriness
    i = Image.open(image_path)
  File "C:\Users\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 3147, in open
    raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file 'C:\\Users\\Users\\AppData\\Local\\Temp\\tmp9mgmvoj4.bmp'

I'm even checking in vcsi.py in line 31:
from PIL import Image, etc.
Reading from this article, it's already same. vcsi.py uses from PIL import modules instead of import modules only.
Checking the image file 'C:\Users\Users\AppData\Local\Temp\tmp9mgmvoj4.bmp' and it turns out 0KB tmp file, tried re-generating thumbnail but not working. Always one image file that has 0KB size and turns out it's empty, no metadata image at all.

Is there's any solution for this? Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions