Skip to content

ValueError: not enough values to unpack #19

@yagarea

Description

@yagarea

Hello, I am trying to use this plugin but when I use it I get this error:

Traceback (most recent call last):
File "/home/john/Projects/autotranscoder/./transcoder.py", line 12, in
FFProbe(file)
File "/home/john/.local/lib/python3.9/site-packages/ffprobe/ffprobe.py", line 54, in init
self.streams.append(FFStream(data_lines))
File "/home/john/.local/lib/python3.9/site-packages/ffprobe/ffprobe.py", line 114, in init
self.dict.update({key: value for key, value, *_ in [line.strip().split('=')]})
File "/home/john/.local/lib/python3.9/site-packages/ffprobe/ffprobe.py", line 114, in
self.dict.update({key: value for key, value, *_ in [line.strip().split('=')]})
ValueError: not enough values to unpack (expected at least 2, got 1)

This is my code

#!/usr/bin/env python

from ffprobe import FFProbe
import os

path = "/home/videos/"

for files in os.listdir(path):
    file = os.path.join(path, files)
    if os.path.isfile(file):
        FFProbe(file)
        print(metadata)

I am 100% sure that directory exists and for loop generates valid paths to video files.

How can I fix it ?

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