Skip to content

as_PIL option broken in extract_frames_as_images due to _check_cv_dep import behavior #376

@keighrim

Description

@keighrim

Bug Description

extract_frames_as_images(..., as_PIL=True) fails with AttributeError: module 'PIL' has no attribute 'Image'.

Cause

_check_cv_dep() (added in 1.3.0) uses importlib.__import__(dep), which returns the top-level package, not the requested submodule. So _check_cv_dep('PIL') returns the PIL namespace package without loading PIL.Image.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions