I had two php scripts on the Loxberry that were activated from the Miniserver to control a feature of an inverter/battery combination. The first script was a POST command (with Digest Authentication) that suspended a battery calibration feature. The second script was a similar POST command but re-enabled the calibration.
The security of the inverter was upgraded with a recent firmware update. The firmware update broke the existing facility to send POST commands and control the calibration feature. This was acknowledged by the company.
I've been communicating with the local engineering department of the company. They forwarded a Python script that 'should' work with the new firmware to suspend the calibration feature.
I hope someone can provide some guidance on how this script should be run on the Loxberry (or if it's even viable to use on the Loxberry?). I've tried the command -
python post.py
and get the following error message -
Traceback (most recent call last):
File "./post.py", line 12, in <module>
from importlib.util import spec_from_file_location, module_from_spec
ImportError: No module named util
The engineering department advised that the error message means that the python environment doesn't have the module called util. It will need to be installed.
I've googled the error 'ImportError: No module named util' and there's many confusing options. Some suggest I need Python 3.4, (Python version 2.7.13 is on the Loxberry).
Any ideas on how to proceed from here? I can provide the full Python script if it helps, but I think the problem is possibly just the Python environment?
Kommentar