From 37f633eee1c27262111acae4f4e0851ee8b012f8 Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Sun, 14 Apr 2024 21:51:43 -0700 Subject: [PATCH] Fix metadata extraction --- jcvi/graphics/grabseeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jcvi/graphics/grabseeds.py b/jcvi/graphics/grabseeds.py index f4a2d6c3..4aedc18c 100644 --- a/jcvi/graphics/grabseeds.py +++ b/jcvi/graphics/grabseeds.py @@ -476,7 +476,7 @@ def convert_image( mainfile = op.join(outdir, pf + ".main.jpg") labelfile = op.join(outdir, pf + ".label.jpg") img = Image(filename=pngfile) - exif = dict((k, v) for k, v in img.metadata.items() if k.startswith("exif:")) + exif = dict((k, img.metadata.get(k)) for k in img.metadata if k.startswith("exif:")) # Rotation, slicing and cropping of main image if rotate: