Skip to content

AttributeError: 'NoneType' object has no attribute 'groups' #16

@ghost

Description

Hey folks,

this lib seems exactly what im looking for but Im unable to properly parse all information using the following snipped:

#!/usr/bin/env python

from ffprobe import FFProbe

# Local file
metadata=FFProbe('/home/mike/Desktop/2 Wie werde ich ein Hase.m4v')

for stream in metadata.streams:
    if stream.is_video():
        print('Stream contains {} frames.'.format(stream.frames()))

I always get back the following error:

File "/home/mike/Documents/PyCharm/Strics.io/strics_app/strics_app/meta_scrape.py", line 6, in <module>
    metadata=FFProbe('/home/mike/Desktop/2 Wie werde ich ein Hase.m4v')
  File "/home/claris/Documents/PyCharm/Strics.io/strics_app/venv/lib/python3.9/site-packages/ffprobe/ffprobe.py", line 75, in __init__
    self.metadata[m.groups()[0]] = m.groups()[1].strip()
AttributeError: 'NoneType' object has no attribute 'groups'

can smb help ?

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