emcconville / wand

The ctypes-based simple ImageMagick binding for Python
http://docs.wand-py.org/
Other
1.42k stars 199 forks source link

change load_library to return the paths of files that failed to load #646

Open airyclam opened 11 months ago

airyclam commented 11 months ago

This is related to issue #645 , where the user received error message

  File "/Users/<User>/opt/anaconda3/envs/<envname>/lib/python3.11/site-packages/wand/api.py", line 143, in load_library
    raise IOError('cannot find library; tried paths: ' + repr(tried_paths))

where tried_paths included a path with a library file. The root cause was that the file existed but could not be loaded as it was incompatible.

The new change includes in the error message that a file was found but was unable to be loaded correctly. This indicates to the user that they should check that file to make sure it's compatible with their system.

Tsubashi commented 8 months ago

Having run into this with users as well, this seems like a good idea.