LogPoint 7 Python error running script

0

Hi

Has there been some changes in the implementation of Python in LogPoint 7.

I have a script 2 scripts that ran without errors in LogPoint 6 but now I get:

--

Traceback (most recent call last):
File "device_export_lp6.py", line 17, in <module>
from pylib import mongo
ModuleNotFoundError: No module named 'pylib'

--

Regards

Hans

Share This Post:

2 comments

Date Votes
0
Avatar
Markus Nebel

It looks like the use of pylib and dependencies was limited to the root and loginspect user.

Try becoming root (e.g. with the partner user) and run

/opt/immune/bin/envdo python YOUR_PYTHON_SCRIPT.py

0
Avatar
Hans-Henrik Mørkholt

Hi MArkus

Thanks a lot for the answer.

I succeeded in solving the issue for one script by adding the following two lines to the code.

---------------------

#!/opt/immune/bin/envdo /usr/bin/python3.7

sys.path.append('/opt/logpoint/python/lib/python3.7/site-packages')

---------

Regards

Hanss

Please sign in to leave a comment.