cuBool
cuBool copied to clipboard
pycubool tries to load its logs as its shared library
setup_default_logger()
creates log files with names in format "cubool-*.textlog" in pycubool's install directory. After this, when pycubool is initialized the next time, if CUBOOL_PATH
is not set, pycubool iterates over the files in its install directory and takes the first one with "cubool" in its name which sometimes leads to the log file being chosen over the actual shared library file.
Consequently, this leads to a crash on pycubool import with error like this:
import pycubool as cb
<...>/python3.10/site-packages/pycubool/__init__.py:29: in <module>
init_wrapper()
<...>/python3.10/site-packages/pycubool/wrapper.py:28: in init_wrapper
singleton = Wrapper()
<...>/python3.10/site-packages/pycubool/wrapper.py:60: in __init__
self.loaded_dll = bridge.load_and_configure(self.load_path)
<...>/python3.10/site-packages/pycubool/bridge.py:172: in load_and_configure
lib = ctypes.cdll.LoadLibrary(cubool_lib_path)
/usr/lib/python3.10/ctypes/__init__.py:452: in LoadLibrary
return self._dlltype(name)
/usr/lib/python3.10/ctypes/__init__.py:374: in __init__
self._handle = _dlopen(self._name, mode)
E OSError: <...>/python3.10/site-packages/pycubool/cubool-05-12-22--15-57-28.textlog: invalid ELF header