lobe-adafruit-kit icon indicating copy to clipboard operation
lobe-adafruit-kit copied to clipboard

Error on RPI Buster : AttributeError: 'TFLiteImageModel' object has no attribute 'lock'

Open solarslurpi opened this issue 3 years ago • 1 comments

I was following the instructions on Adafruit's web site. At the point where I'm running

cd ~
cd lobe-adafruit-kit
python3 lobe-basic-prediction.py

I receive the TFliteImageModel object has no attribute lock I ran some of the examples and at least one also did this.

Is there an outdated version of the TensorFlow model created that is not compatible? Please let me know and thank you.

Predictions starting, to stop press "CTRL+C"
Traceback (most recent call last):
  File "lobe-basic-prediction.py", line 70, in <module>
    main()
  File "lobe-basic-prediction.py", line 37, in main
    result = model.predict(img)
  File "/usr/local/lib/python3.7/dist-packages/lobe/model/image_model.py", line 65, in predict
    results = self.backend.predict(image_array)
  File "/usr/local/lib/python3.7/dist-packages/lobe/backends/tflite/backend.py", line 59, in predict
    with self.lock:
AttributeError: 'TFLiteImageModel' object has no attribute 'lock'

solarslurpi avatar Nov 22 '21 17:11 solarslurpi

Should be fixed with this commit https://github.com/lobe/lobe-python/commit/178216488b3aa2b2a3d02b11b9a2d0ef9664364e , please update to the latest lobe-python (0.6.1)

mbeissinger avatar Nov 29 '21 09:11 mbeissinger