Error when try to make iris locally.
See original GitHub issueHi All,
We encounter following error when try to test iris locally:
____________________________________________________________________________________ ERROR collecting test/test_irisapi.py _____________________________________________________________________________________ ImportError while importing test module '/Users/i505939/Projects/iris/test/test_irisapi.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: env/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) env/lib/python2.7/site-packages/py/_path/local.py:704: in pyimport __import__(modname) env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) env/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module exec(co, mod.__dict__) test/test_irisapi.py:7: in <module> from iris.api import ReqBodyMiddleware, AuthMiddleware, Healthcheck env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) src/iris/api.py:17: in <module> from urllib.parse import parse_qs env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) E ImportError: No module named parse _____________________________________________________________________________________ ERROR collecting test/test_sender.py _____________________________________________________________________________________ ImportError while importing test module '/Users/i505939/Projects/iris/test/test_sender.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: env/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) env/lib/python2.7/site-packages/py/_path/local.py:704: in pyimport __import__(modname) env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) env/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module exec(co, mod.__dict__) test/test_sender.py:9: in <module> from iris.bin.sender import init_sender env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) src/iris/bin/sender.py:26: in <module> from iris.api import load_config env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) src/iris/api.py:17: in <module> from urllib.parse import parse_qs env/lib/python2.7/site-packages/gevent-1.4.0-py2.7-macosx-10.15-x86_64.egg/gevent/builtins.py:96: in __import__ result = _import(*args, **kwargs) E ImportError: No module named parse
We’ve installed python parse module and the error still persists. The same error we get during docker image creation as well.
Please advise.
Regards Valentin
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
Hello,
We have tested with master, unfortunately we couldn’t build a container. We’ve checkout “py3” and with it we managed to build a container, but when we try to start it, this is the output:
/bin/sh: 0: Can't open sudo
We managed to adapt iris.yaml file to use python3 for virtualenv and pip3:
- type: "shell" 91 inline: 92 - 'sudo apt-get -y install curl python3-dev python3-pip python3-wheel python3-venv python-pip uwsgi unzip virtualenv sudo python-dev libyaml-dev libsasl2-dev libldap2-dev nginx uwsgi-plugin-python u wsgi-plugin-gevent-python uwsgi-plugin-python3 mysql-client && sudo rm -rf /var/cache/apt/archives/*' 93 - sudo useradd -m -s /bin/bash iris 94 - sudo chown -R iris:iris /home/iris /var/log/nginx /var/lib/nginx 95 - sudo -Hu iris mkdir -p /home/iris/var/log/uwsgi /home/iris/var/log/nginx /home/iris/var/run 96 - sudo mv /tmp/repo /home/iris/source 97 - "sudo chown -R iris:iris /home/iris/source" 98 - sudo mv /home/iris/source/ops/config/systemd/uwsgi-iris.service /etc/systemd/system/uwsgi-iris.service 99 - sudo mv /home/iris/source/ops/config/systemd/nginx-iris.service /etc/systemd/system/nginx-iris.service 100 - sudo mv /home/iris/source/ops/config/systemd/nginx-iris.socket /etc/systemd/system/nginx-iris.socket 101 - sudo -Hu iris ln -s /home/iris/source/ops/daemons /home/iris/daemons 102 - sudo -Hu iris ln -s /home/iris/source/ops/entrypoint.py /home/iris/entrypoint.py 103 - sudo -Hu iris ln -s /home/iris/source/db /home/iris/db 104 - sudo -Hu iris mkdir /home/iris/config 105 - sudo -Hu iris cp /home/iris/source/configs/config.yaml /home/iris/config/config.yaml 106 - sudo -Hu iris python3 -m venv /home/iris/env 107 - sudo -Hu iris /bin/bash -c 'source /home/iris/env/bin/activate && cd /home/iris/source && pip3 install ".[prometheus,kazoo]"'
but still same error when trying to start container.
Please advise.
Valentin
Did you mange to fix this issue? After some help fixing missing README.md, I’m stuck with same error: https://github.com/linkedin/iris/issues/573#issuecomment-739885242.