MediaArea / MediaConch_SourceCode

Media conformance checker
https://MediaArea.net/MediaConch
BSD 2-Clause "Simplified" License
29 stars 18 forks source link

pypi library on OSX Windows throws dlopen image not found error #706

Closed jsciame closed 2 years ago

jsciame commented 2 years ago

Seeing an issue on MAC OSX 10.15.7 with python 3.9.1 running in a virtual env.

(venv) MacBook-Pro:pymediaconch jsciame$ pip install mediaconch Collecting mediaconch Downloading https://ps-prod-{accountid}.d.codeartifact.us-east-1.amazonaws.com/pypi/msc-repo/simple/mediaconch/18.3.20210204/mediaconch-18.3.20210204.tar.gz (14.2 MB) |████████████████████████████████| 14.2 MB 1.1 MB/s Using legacy 'setup.py install' for mediaconch, since package 'wheel' is not installed. Installing collected packages: mediaconch Running setup.py install for mediaconch ... done Successfully installed mediaconch-18.3.20210204

When I go to use it, I'm getting an error below. Code:

 import unittest
from mediaconch import MediaConch

class Test_MediaConchLibrary(unittest.TestCase):

    def setUp(self) -> None:
        self.mediaconch = MediaConch()

Stack trace:

/Users/jsciame/PycharmProjects/pymediaconch/venv/bin/python3.9 /Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/_jb_nosetest_runner.py --target test_mediaconchlib.py::Test_MediaConchLibrary

Testing started at 6:05 PM ... Launching Nosetest with arguments /Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/_jb_nosetest_runner.py test_mediaconchlib.py:Test_MediaConchLibrary in /Users/jsciame/PycharmProjects/pymediaconch/pymediaconch/tests

Error Traceback (most recent call last): File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/init.py", line 37, in _MediaConchLib_Handler = _CDLL("{}/{}/{}/{}".format(_module, _system, _machine, _library)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/darwin/x86_64/libmediaconch.0.dylib, 6): image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 59, in testPartExecutor yield File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 593, in run self._callTestMethod(testMethod) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 550, in _callTestMethod method() File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/loader.py", line 417, in loadTestsFromName module = self.importer.importFromPath( File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 234, in load_module return load_source(name, filename, file) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 171, in load_source module = _load(spec) File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/jsciame/PycharmProjects/pymediaconch/pymediaconch/tests/test_mediaconchlib.py", line 3, in from mediaconch import MediaConch File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/init.py", line 39, in _MediaConchLib_Handler = _CDLL(_library) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(libmediaconch.0.dylib, 6): image not found

E

ERROR: Failure: OSError (dlopen(libmediaconch.0.dylib, 6): image not found)

Traceback (most recent call last): File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/init.py", line 37, in _MediaConchLib_Handler = _CDLL("{}/{}/{}/{}".format(_module, _system, _machine, _library)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/darwin/x86_64/libmediaconch.0.dylib, 6): image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/loader.py", line 417, in loadTestsFromName module = self.importer.importFromPath( File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 234, in load_module return load_source(name, filename, file) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 171, in load_source module = _load(spec) File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/jsciame/PycharmProjects/pymediaconch/pymediaconch/tests/test_mediaconchlib.py", line 3, in from mediaconch import MediaConch File "/Users/jsciame/PycharmProjects/pymediaconch/venv/lib/python3.9/site-packages/mediaconch/init.py", line 39, in _MediaConchLib_Handler = _CDLL(_library) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(libmediaconch.0.dylib, 6): image not found


Ran 1 test in 0.007s

FAILED (errors=1)

Process finished with exit code 1

g-maxime commented 2 years ago

Just added a new version (18.3.20211204) with macOS binaries. Please retry.

jsciame commented 2 years ago

Thanks! This is better now. No error on loading of the library.