View Single Post
Old 05-23-2024, 02:37 PM   #26
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 876
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
@KevinH: It is essential to add try/except from line 482, as it throws an error if there is no metadata in the image.

Spoiler:
Code:
Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Becky\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 482, in run
    alttext = get_image_metadata_alttext(imgpath, plang)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Becky\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 238, in get_image_metadata_alttext
    xmpxml = im.info["XML:com.adobe.xmp"]
             ~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'XML:com.adobe.xmp'
Error: 'XML:com.adobe.xmp'
BeckyEbook is offline   Reply With Quote