jgriss / FusionSolarPy

A basic client to the Huawei Fusion Solar cloud interface for solar power plants
MIT License
30 stars 12 forks source link

Error with captha and numpy #16

Closed ATNALDC closed 10 months ago

ATNALDC commented 10 months ago

Since few days ago I get the following message when running my pyhton code, It used to work and numpy is installed. ¿Do you know what it could be happening?

OpenCV bindings requires "numpy" package.
Install it via command:
    pip install numpy
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.9/site-packages/fusion_solar_py/client.py", line 125, in wrapper
    result = func(self, *args, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/fusion_solar_py/client.py", line 279, in _login
    raise CaptchaRequiredException("Login failed: Incorrect verification code.")
fusion_solar_py.exceptions.CaptchaRequiredException: Login failed: Incorrect verification code.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in <module>
    from . import overrides
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in <module>
    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 "/home/pi/.local/lib/python3.9/site-packages/numpy/__init__.py", line 130, in <module>
    from numpy.__config__ import show as show_config
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/__config__.py", line 4, in <module>
    from numpy.core._multiarray_umath import (
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/__init__.py", line 50, in <module>
    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:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/usr/bin/python3"
  * The NumPy version is: "1.26.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
ATNALDC commented 10 months ago

I final found the issue, I was trying to run it with python3 and its necessary to use python3.9

jgriss commented 10 months ago

@ATNALDC

Thanks a lot for reporting this issue! I'll update the documentation to highlight this.

I'll also release a version where OpenCV is optional - then older versions of python3 will work again