How to fix ''Alpr' object has no attribute 'loaded'' error in Python 3.x

1.5k Views Asked by At

i'm setting up a recognize of plate with python but i can't use the library 'OpenALPR' because send me a error

OpenalPR Load Error

try:

        if platform.system().lower().find("windows") != -1:
            self._openalprpy_lib = ctypes.cdll.LoadLibrary("libopenalprpy.dll")
        elif platform.system().lower().find("darwin") != -1:
            self._openalprpy_lib = ctypes.cdll.LoadLibrary("libopenalprpy.dylib")
        else:
            self._openalprpy_lib = ctypes.cdll.LoadLibrary("libopenalprpy.so")
    except OSError as e:
        nex = OSError("Unable to locate the OpenALPR library. Please make sure that OpenALPR is properly "
                      "installed on your system and that the libraries are in the appropriate paths.")
        if _PYTHON_3:
            nex.__cause__ = e;
        raise nex
    finally:
        mutex.release()
1

There are 1 best solutions below

0
On BEST ANSWER

Try giving full path of the libopenalprpy.so library file. This issue seems like the python wrapper is not compiled and installed for python3.

Install python3-dev package, and then compile and install openalpr.

For uinstalling the locally compiled version you can use the following command

cd build
sudo make uninstall