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

pims.Video (PyAVReaderTimed backend) not closed by context manager #446

Open
EitanHemed opened this issue May 8, 2023 · 0 comments · May be fixed by #447
Open

pims.Video (PyAVReaderTimed backend) not closed by context manager #446

EitanHemed opened this issue May 8, 2023 · 0 comments · May be fixed by #447

Comments

@EitanHemed
Copy link

EitanHemed commented May 8, 2023

import pims

# A video file you can load with pims.Video
f = 'foo.bar'

with pims.Video(f) as vid:
    frame = vid[0]
 
# Expected to raise ValueError
print(vid[1].shape)

vid.close()

# Expected to raise ValueError
print(vid[2].shape)

Using the context manager it is expected that vid will be closed and subsequent frames will not be available for access.

However, it seems that the close method remains unimplemented (see 1, 2).

@EitanHemed EitanHemed linked a pull request May 9, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant