appzer / zabbix-pushsafer

A python script for sending pushsafer.com notifications in ZABBIX.
https://www.pushsafer.com
7 stars 2 forks source link

ImportError: cannot import name 'init' #6

Open unforgiving opened 2 years ago

unforgiving commented 2 years ago

Hi, I'm not able to run your script, I'm getting the error:

user@ubuntu:~# python3 zabbix-pushsafer.py

Traceback (most recent call last):
  File "zabbix-pushsafer.py", line 21, in <module>
    from pushsafer import init, Client
ImportError: cannot import name 'init' from 'pushsafer' (/usr/local/lib/python3.8/dist-packages/pushsafer.py)

I'm using Python 3.8 on Ubuntu 20, same issue with Python 3.6

appzer commented 2 years ago

do you imported the pushsafer python package? pip install python-pushsafer

unforgiving commented 2 years ago

Yes, I did

@ctl-zabbix5:/tmp# pip install python-pushsafer
Requirement already satisfied: python-pushsafer in /usr/local/lib/python3.8/dist-packages (1.0)
Requirement already satisfied: requests>=1.0 in /usr/local/lib/python3.8/dist-packages (from python-pushsafer) (2.27.1)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in /usr/local/lib/python3.8/dist-packages (from requests>=1.0->python-pushsafer) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=1.0->python-pushsafer) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=1.0->python-pushsafer) (1.26.8)
Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in /usr/local/lib/python3.8/dist-packages (from requests>=1.0->python-pushsafer) (2.0.10)
wil-m commented 2 years ago

+1, having same issue python --version Python 3.8.10

kelsen commented 1 year ago

Having same issue here too. Ubuntu 20 Python 3.8