You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[11:56:43] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ pip3 install zabbix-template-converterDefaulting to user installation because normal site-packages is not writeableCollecting zabbix-template-converter Downloading zabbix-template-converter-1.1.0.tar.gz (5.1 kB) Preparing metadata (setup.py) ... doneBuilding wheels for collected packages: zabbix-template-converter Building wheel for zabbix-template-converter (setup.py) ... done Created wheel for zabbix-template-converter: filename=zabbix_template_converter-1.1.0-py3-none-any.whl size=5396 sha256=9906875d1bb749e17cb598cacbc901014f34c8ee2bdca3319218f95c3d6b838f Stored in directory: /home/nsvcadm/.cache/pip/wheels/03/5c/a8/589ab4c1562f49e5265ed7c9de614c8b6f17d33690c17ecb55Successfully built zabbix-template-converterInstalling collected packages: zabbix-template-converterSuccessfully installed zabbix-template-converter-1.1.0
Is not possible to execute any command from the script since it has an sintax error.
[11:56:51] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ zabbix-template-converter -h File "/home/nsvcadm/.local/bin/zabbix-template-converter", line 339 print '<?xml version="1.0" encoding="UTF-8"?>' ^SyntaxError: Missing parentheses in call to 'print'. Did you mean print('<?xml version="1.0" encoding="UTF-8"?>')?
Possible problems:
It need some other python module/script in their requirement, so it could understant this sintax:
[11:47:09] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ cat /etc/*release*Oracle Linux Server release 8.5NAME="Oracle Linux Server"VERSION="8.5"ID="ol"ID_LIKE="fedora"VARIANT="Server"VARIANT_ID="server"VERSION_ID="8.5"PLATFORM_ID="platform:el8"PRETTY_NAME="Oracle Linux Server 8.5"ANSI_COLOR="0;31"CPE_NAME="cpe:/o:oracle:linux:8:5:server"HOME_URL="https://linux.oracle.com/"BUG_REPORT_URL="https://bugzilla.oracle.com/"ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"ORACLE_BUGZILLA_PRODUCT_VERSION=8.5ORACLE_SUPPORT_PRODUCT="Oracle Linux"ORACLE_SUPPORT_PRODUCT_VERSION=8.5Red Hat Enterprise Linux release 8.5 (Ootpa)Oracle Linux Server release 8.5cpe:/o:oracle:linux:8:5:server[11:47:27] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ uname -aLinux DESKTOP-ABF8GII 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Python3 version:
[11:47:41] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ python3Python 3.6.8 (default, Nov 10 2021, 06:50:23)[GCC 8.5.0 20210514 (Red Hat 8.5.0-3.0.2)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import sys>>> sys.version'3.6.8 (default, Nov 10 2021, 06:50:23) \n[GCC 8.5.0 20210514 (Red Hat 8.5.0-3.0.2)]'>>> quit()[11:52:31] nsvcadm@DESKTOP-ABF8GII:2.BEEGOL_V4 $ pip3 --versionpip 21.3.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
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
The text was updated successfully, but these errors were encountered: