Closed tdelov closed 3 years ago
root@bbcd54098726:~# python --version Python 2.7.16 root@bbcd54098726:~# python test2.py Traceback (most recent call last): File "test2.py", line 5, in import check_mk_web_api File "/usr/local/lib/python2.7/site-packages/check_mk_web_api/init.py", line 6, in import urllib.parse ImportError: No module named parse
My script.
import check_mk_web_api import os, ssl if (not os.environ.get('PYTHONHTTPSVERIFY', '') and getattr(ssl, '_create_unverified_context', None)): ssl._create_default_https_context = ssl._create_unverified_context myhostname = "myhost.domain.edu" api = check_mk_web_api.WebApi('https://checkmk.domain.edu/manage/check_mk/webapi.py', username='automation', secret='123456') myresult = api.get_host( myhostname , effective_attributes=True) print ( myresult )
I noticed that as well and added pull request #23 which fixes this. It is not yet included in the master branch.
Fixed with #23. Will be part of the next release.
Has been fixed with release 1.7.1.
root@bbcd54098726:~# python --version Python 2.7.16 root@bbcd54098726:~# python test2.py Traceback (most recent call last): File "test2.py", line 5, in
import check_mk_web_api
File "/usr/local/lib/python2.7/site-packages/check_mk_web_api/init.py", line 6, in
import urllib.parse
ImportError: No module named parse
My script.