Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JecintaMulongo opened this issue Aug 20, 2020 · 3 comments
Open

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

JecintaMulongo opened this issue Aug 20, 2020 · 3 comments

Comments

@JecintaMulongo
Copy link

I encountered this error while running openalpr in pycharm ubuntu:

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 0x7f1ef1434d68>>
Traceback (most recent call last):
File "/virtualenvs/cv/lib/python3.6/site-packages/openalpr/openalpr.py", line 159, in del
if self.is_loaded():
File "/.virtualenvs/cv/lib/python3.6/site-packages/openalpr/openalpr.py", line 212, in is_loaded
if not self.loaded:
AttributeError: 'Alpr' object has no attribute 'loaded'

any solution

@wesimet
Copy link

wesimet commented Sep 8, 2020

Same Problem

@mandza
Copy link

mandza commented Sep 11, 2020

Could you provide code you run? Not just error.
Because this error says that you did not provide needed attributes to alpr command

@cclauss
Copy link

cclauss commented Nov 25, 2021

Dup of #533

cclauss added a commit to cclauss/openalpr that referenced this issue Nov 25, 2021
There are currently [46 open issues related to `loaded`](https://github.com/openalpr/openalpr/search?p=2&q=loaded&type=issues).  Many of these [`AttributeError` issues](https://github.com/openalpr/openalpr/search?q=AttributeError&type=issues) are caused because `self.loaded` is only defined at the end of this method on (line 117).  If an exception is raised (like line 62, etc.) then `self.loaded` is _never_ defined so subsequent code fails when trying to determine if `Alpr` has successfully loaded.

Closes openalpr#311
Closes openalpr#414
Closes openalpr#426
Closes openalpr#461 
Closes openalpr#508
Closes openalpr#533
Closes openalpr#660
Closes openalpr#732
Closes openalpr#738
Closes openalpr#764
Closes openalpr#806
Closes openalpr#837 
Closes openalpr#913 
Closes openalpr#916 
Related to openalpr#555
Related to Homebrew/homebrew-core#89948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants