-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
urllib camera numpy issue #1351
Comments
Have you attempted to upgrade the library or install the dependency it lists? |
Yes I've tried to install everything by hand even before installing mycodo on a new system. Still the same error |
In the web log it's actually a bit better to understand: |
How did you install the dependency? |
On the initial try I did it via the Mycodo web interface, then when it did not work I did a clean install of Raspbian Lite and installed numpy via $ pip install numpy |
I'm referring to the dependency numpy told you about in the log lines you pasted. |
As I said, i installed it via the mycodo web interface prompt when i tried to add the urllib camera. I‘ve also tried to somehow get rid of this installation but pip uninstall does not work and just deleting the directory and hoping for python to access the user installed numpy dependency did not either. |
How did you install libopenblas (the dependency numpy is stating you're missing in the log you pasted) from the Mycodo web interface? This is not a feature of Mycodo unless you modified the code. |
I never willingly installed libatlas. Though I am running gphoto2 on the pi to take automated timelapse photos with a DSLR, which I wanted to be able to import to mycodo with the urllib camera, so this might be the issue. I will try it on a system without gohoto2 later today. |
Who mentioned libatlas? |
Oh, sorry excuse the confusion. I misread the log and your message. I installed it via $ sudo apt-get install libopenblas-dev |
I have now manually compiled openblas and the error message has shrunken significantly to this: Nov 10 15:19:19 raspberrypi python[590]: Traceback (most recent call last): I cannot make much sense of this, as it seems like there is already an error beforehand when creating the jpg file, which is just not logged |
I finally got it working, so here are the steps I followed for anyone with the same problem:
Now it works. Thanks for your help anyways, without you I wouldn't have noticed, where the core of the problem is coming from! |
Although this may work for a manual fix, this isn't a viable solution for a software fix. I will attempt to replicate the issue and find an amenable solution that can be applied. |
My solution was with checking journal: Then
|
I couldn't replicate the issue. Perhaps your issue stems from your use of a non-current operating system version. In any case, I can't do any diagnostics if it can't be replicated and I will only use the latest OS version, since it's too much trouble to support old OS versions. |
That‘s pretty weird. I got the Raspberry Pi OS (Legacy) Lite 32bit from the Rasperry Pi Flasher, so it should have been the newest |
By definition, legacy is not the latest |
For optimal performance with Raspi 4b, it is recommended to utilize a 64-bit operating system to unlock its full processing capabilities. |
I was only using the 32bit version, because when I installed mycodo, weirdly this version was the only one which I was even capable of installing it on. The other OS‘s always had some error show up along the way |
Legacy does not mean 32-bit, it means old version |
Describe the problem/bug
The urllib camera always fails when trying to capture a still image and the web-UI shows the error: "Could not acquire image"
Versions:
Reproducibility
Please list specific setup details that are involved and the steps to reproduce the behavior:
The log shows this:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/init.py", line 130, in
from numpy.config import show as show_config
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/config.py", line 4, in
from numpy.core._multiarray_umath import (
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/core/init.py", line 50, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libopenblas.so.0: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/mycodo-root/mycodo/controllers/controller_function.py", line 79, in loop
self.run_function.loop()
File "/home/moritz/Mycodo/mycodo/functions/equation_multi.py", line 167, in loop
last_measurement_a = self.get_last_measurement(
File "/var/mycodo-root/mycodo/abstract_base_controller.py", line 533, in get_last_measurement
return get_last_measurement(device_id, measurement_id, max_age=max_age)
File "/var/mycodo-root/mycodo/utils/influx.py", line 322, in get_last_measurement
last_measurement = read_influxdb_single(
File "/var/mycodo-root/mycodo/utils/influx.py", line 372, in read_influxdb_single
data = query_string(
File "/var/mycodo-root/mycodo/utils/influx.py", line 301, in query_string
ret_value = query_flux(
File "/var/mycodo-root/mycodo/utils/influx.py", line 185, in query_flux
from influxdb_client import InfluxDBClient
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/init.py", line 382, in
from influxdb_client.client.delete_api import DeleteApi
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/delete_api.py", line 7, in
from influxdb_client.client._base import _BaseDeleteApi
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/_base.py", line 22, in
from influxdb_client.client.write.dataframe_serializer import DataframeSerializer
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/write/dataframe_serializer.py", line 12, in
from influxdb_client.client.write.point import _ESCAPE_KEY, _ESCAPE_STRING, _ESCAPE_MEASUREMENT, DEFAULT_WRITE_PRECISION
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/write/point.py", line 40, in
import numpy as np
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/init.py", line 135, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
2023-11-08 19:06:41,678 - ERROR - mycodo.controllers.controller_function_2ce6801e - Exception while running loop()
Traceback (most recent call last):
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/core/init.py", line 24, in
from . import multiarray
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in
from . import overrides
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in
from numpy.core._multiarray_umath import (
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/init.py", line 130, in
from numpy.config import show as show_config
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/config.py", line 4, in
from numpy.core._multiarray_umath import (
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/core/init.py", line 50, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libopenblas.so.0: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/mycodo-root/mycodo/controllers/controller_function.py", line 79, in loop
self.run_function.loop()
File "/home/moritz/Mycodo/mycodo/functions/equation_multi.py", line 167, in loop
last_measurement_a = self.get_last_measurement(
File "/var/mycodo-root/mycodo/abstract_base_controller.py", line 533, in get_last_measurement
return get_last_measurement(device_id, measurement_id, max_age=max_age)
File "/var/mycodo-root/mycodo/utils/influx.py", line 322, in get_last_measurement
last_measurement = read_influxdb_single(
File "/var/mycodo-root/mycodo/utils/influx.py", line 372, in read_influxdb_single
data = query_string(
File "/var/mycodo-root/mycodo/utils/influx.py", line 301, in query_string
ret_value = query_flux(
File "/var/mycodo-root/mycodo/utils/influx.py", line 185, in query_flux
from influxdb_client import InfluxDBClient
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/init.py", line 382, in
from influxdb_client.client.delete_api import DeleteApi
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/delete_api.py", line 7, in
from influxdb_client.client._base import _BaseDeleteApi
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/_base.py", line 22, in
from influxdb_client.client.write.dataframe_serializer import DataframeSerializer
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/write/dataframe_serializer.py", line 12, in
from influxdb_client.client.write.point import _ESCAPE_KEY, _ESCAPE_STRING, _ESCAPE_MEASUREMENT, DEFAULT_WRITE_PRECISION
File "/var/mycodo-root/env/lib/python3.9/site-packages/influxdb_client/client/write/point.py", line 40, in
import numpy as np
File "/var/mycodo-root/env/lib/python3.9/site-packages/numpy/init.py", line 135, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
it just loops the "The above exception was the direct cause of the following exception" basically for >10.000 lines of code
The text was updated successfully, but these errors were encountered: