Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to run test #179

Open
unnilennium opened this issue Sep 6, 2019 · 2 comments
Open

unable to run test #179

unnilennium opened this issue Sep 6, 2019 · 2 comments

Comments

@unnilennium
Copy link

unnilennium commented Sep 6, 2019

after installing according to Readme, I tried the test as shown in the wiki (obviously updating my username ;) ):

# sudo -u zabbix ./zbxtg.py "@username" test test
Traceback (most recent call last):
  File "./zbxtg.py", line 9, in <module>
    import requests
  File "/usr/lib/python2.6/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/usr/lib/python2.6/site-packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/usr/lib/python2.6/site-packages/urllib3/connectionpool.py", line 92
    _blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}
                                    ^
SyntaxError: invalid syntax
# python --version
Python 2.6.6
# pip --version
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)
@helipopolis
Copy link

Need Python 2.7

@unnilennium
Copy link
Author

thanks for the info, could you add it in the Readme to avoid confusion?

I am using a old CentOs 6, after removing requirements using pip and reinstalling using yum I got it working:

pip uninstall requests requests-oauthlib PySocks urllib3 chardet
yum install  python2-pysocket python-requests python-requests-oauthlib --enablerepo=epel

then test message was working

alternatively I would have tried software collection packages for python27 and made a wrapper to enable sclo before calling the script.

worked fine without the sclo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants