samtwilliams / ha-openalpr

OpenALPR Number Plate Recognition for Home Assistant
GNU Affero General Public License v3.0
17 stars 7 forks source link

AttributeError: 'Alpr' object has no attribute 'loaded' #6

Open vladosam opened 4 years ago

vladosam commented 4 years ago

I'm trying to test this but once i run docker run openalpr:latest i get this error

Traceback (most recent call last):
  File "/anpr/readstream.py", line 90, in <module>
    main()
  File "/anpr/readstream.py", line 26, in main
    alpr = Alpr('gb', '/srv/openalpr/openalpr.conf', '/srv/openalpr/runtime_data')
  File "/usr/local/lib/python3.6/dist-packages/openalpr/openalpr.py", line 95, in __init__
    self._add_encoded_image_to_batch_func = self._openalprpy_lib.openalpr_add_encoded_image_to_batch
  File "/usr/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libopenalpr.so.2: undefined symbol: openalpr_add_encoded_image_to_batch
Exception ignored in: <bound method Alpr.__del__ of <openalpr.openalpr.Alpr object at 0x7f286e06a128>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/openalpr/openalpr.py", line 159, in __del__
    if self.is_loaded():
  File "/usr/local/lib/python3.6/dist-packages/openalpr/openalpr.py", line 212, in is_loaded
    if not self.loaded:
AttributeError: 'Alpr' object has no attribute 'loaded'