Skip to content

Warning: [minor] Entries in ExifIFD were out of sequence. Fixed #22

@priyamsaha

Description

@priyamsaha

When using the setTag() function inside a for loop(multiple files in a directory), I am getting the following error: "Warning: [minor] Entries in ExifIFD were out of sequence. Fixed". And the for loop halts for a while like 2-3 mins and then continues. Is there a fix to this or am I doing something wrong? Please find my code snippet below:

cwd=os.getcwd()
for f in sorted(os.listdir(cwd)):
  try:
        image = Image.open(f)
        metadata = pyexif.ExifEditor(f)
        exif = json.loads(metadata.getTag('UserComment'))
        exif["header"]["device_id"]="m02-test"
        exif_str = json.dumps(exif)
        metadata.setTag('UserComment', exif_str)

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