Open brenocrs opened 2 years ago
pip 20.3.4 for python 3.8 line 339 change to:
print('<?xml version="1.0" encoding="UTF-8"?>')
Traceback (most recent call last):
File "/usr/local/sbin/zabbix-template-converter", line 343, in <module>
__main__()
File "/usr/local/sbin/zabbix-template-converter", line 317, in __main__
type=file)
NameError: name 'file' is not defined
file() is not supported in Python 3
line line 317 change to:
type=argparse.FileType('r'))
but:
File "/usr/local/sbin/zabbix-template-converter", line 345, in <module>
__main__()
File "/usr/local/sbin/zabbix-template-converter", line 335, in __main__
rule.apply()
File "/usr/local/sbin/zabbix-template-converter", line 75, in apply
if self.versioncmp('3') < 0:
File "/usr/local/sbin/zabbix-template-converter", line 61, in versioncmp
return cmp(V(self.version), V(version))
NameError: name 'cmp' is not defined
cmp function exists only in Python 2. It was deprecated in Python 3.
Symptom
After the instalation process
Is not possible to execute any command from the script since it has an sintax error.
Possible problems:
Related
7
Environment:
OS:
Python3 version:
Installed Python packages/modules