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

Update snap.py #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update snap.py #48

wants to merge 1 commit into from

Conversation

N07070
Copy link
Contributor

@N07070 N07070 commented Mar 17, 2015

Added possible fixe for #18

Added possible fixe.
@@ -90,6 +90,7 @@ def __init__(self, **opts):
self.file = create_temporary_file(suffix)

if self.media_type is MEDIA_TYPE_VIDEO or self.media_type is MEDIA_TYPE_VIDEO_WITHOUT_AUDIO:
self.file = open(video_filename, 'r+')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this is it. The file is already open from

if data[0:2] == 'PK':
    ...
    self.file = open(video_filename, 'rb')
else:
    ...
    self.file = create_temporary_file(suffix)

@N07070
Copy link
Contributor Author

N07070 commented Mar 17, 2015

Well, it's created, but not opened to write, so I guess it's that ?

@krissrex
Copy link
Contributor

Yeah, try adding w

self.file = open(video_filename, 'rwb')

@@ -90,6 +90,7 @@ def __init__(self, **opts):
self.file = create_temporary_file(suffix)

if self.media_type is MEDIA_TYPE_VIDEO or self.media_type is MEDIA_TYPE_VIDEO_WITHOUT_AUDIO:
self.file = open(video_filename, 'r+')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

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 this pull request may close these issues.

3 participants