ableev / Zabbix-in-Telegram

Zabbix Notifications with graphs in Telegram
MIT License
771 stars 235 forks source link

Use scripts with python 3.7 #208

Open hardwareadictos opened 3 years ago

hardwareadictos commented 3 years ago

Could be a noobish question, but iḿ trying to implement this plugin on a docker-compose Zabbix deploy, made all dockerfile modifications for installing python 3.7 inside the container, as official zabbix server image comes with ubuntu 20.04, there is no way of using python27 (the python version i was using on my old raspberry pi install).

How can i execute those scripts with python 3.7?

Getting this with pyrhon 3.7:

File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 307 file_img = "{0}/{1}.png".format(self.tmp_dir, ^ TabError: inconsistent use of tabs and spaces in indentation

I have both version on my old pi and it works fine with 2.7, having the same issue if i invoke the script with python 3.7 binary.

Thanks in advance :)