LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
197 stars 39 forks source link

from pyexiv2 import Image #68

Closed Chang9412 closed 3 years ago

Chang9412 commented 3 years ago

Traceback (most recent call last): File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 855, in exec_module File "", line 228, in _call_with_frames_removed File "/opt/homebrew/lib/python3.9/site-packages/pyexiv2/init.py", line 6, in from .core import * File "/opt/homebrew/lib/python3.9/site-packages/pyexiv2/core.py", line 1, in from .lib import exiv2api File "/opt/homebrew/lib/python3.9/site-packages/pyexiv2/lib/init.py", line 25, in ctypes.CDLL(os.path.join(lib_dir, 'libexiv2.dylib')) File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(/opt/homebrew/lib/python3.9/site-packages/pyexiv2/lib/libexiv2.dylib, 6): image not found

LeoHsiao1 commented 3 years ago

Thank you for your report.This looks like a compatibility issue.

Let's debug it:

  1. Which version of pyexiv2 do you use?
  2. Which version of MacOS do you use?
  3. Can you manually execute the following Python code?
    import os
    import ctypes
    path = '/opt/homebrew/lib/python3.9/site-packages/pyexiv2/lib/libexiv2.dylib'
    os.path.isfile(path)
    ctypes.CDLL(path)
manuelliebchen commented 3 years ago

I have the same issue:

  1. Version of pyexiv2: 2.6.0
  2. macOs Big Sur 11.4, Apple M1
  3. When I execute the code the same error message as above appearse.
LeoHsiao1 commented 3 years ago

I have the same issue:

  1. Version of pyexiv2: 2.6.0
  2. macOs Big Sur 11.4, Apple M1
  3. When I execute the code the same error message as above appearse.

Thank you for your report. It seems that there is a problem with pyexiv2 v2.6.0. You can use pip install pyexiv2==2.5.0 first. I'll be testing MacOS in a virtual machine these days.

manuelliebchen commented 3 years ago

Allright, that works, thanks :)

LeoHsiao1 commented 3 years ago

Hi, I just released v2.6.2. Please try it on MacOS 11 .