Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIL.UnidentifiedImageError: cannot identify image file #104

Open
S-hdyn opened this issue Jul 21, 2022 · 5 comments
Open

PIL.UnidentifiedImageError: cannot identify image file #104

S-hdyn opened this issue Jul 21, 2022 · 5 comments

Comments

@S-hdyn
Copy link

S-hdyn commented Jul 21, 2022

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

@S-hdyn
Copy link
Author

S-hdyn commented Jul 21, 2022

Screenshot at 20220721231554

In case anyone needs proof of 0KB file.

@Qwerty-Space
Copy link

I'm also experiencing this issue

image

@redthing1
Copy link

Me too.

@xanadu6291
Copy link

I had the same issue. In my case, by setting --end-delay-percent option to 20 fixed the issue...

@AnLuoRidge
Copy link

Same issue as in #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants