Skip to content

Program hangs when using get_metadata function on Windows. #69

@llitkr

Description

@llitkr

Hello.

My program is so simple. I'm just trying basic function of pyexiftool but having problem.

import os
from exiftool import ExifToolHelper

def get_files_in_directory(directory):
    file_list = []
    for filename in os.listdir(directory):
        file_path = os.path.join(directory, filename)
        if os.path.isfile(file_path):
            file_list.append(file_path)
    return file_list

files = get_files_in_directory("directory path")
for i in range(len(files)):
    print(files[i])
    **for d in ExifToolHelper().get_metadata(files[i]):**
        for k, v in d.items():
            print(f"Dict: {k} =- {v}")

My program hangs at bold part.

If I press Ctrl + C in the command window, the metadata of the file is displayed normally with an error. But you can't type Ctrl+C one by one. Why stop there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions