question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when try to make iris locally.

See original GitHub issue

Hi 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:open
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
v94401commented, Oct 19, 2020

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

1reaction
lukdzcommented, Dec 7, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation Troubleshooting - Iris
When you run the Iris startup command, the application does not open; the SED Importer startup command fails with an error message. This...
Read more >
Issues · linkedin/iris - GitHub
Iris is a highly configurable and flexible service for paging and messaging. ... linkedin / iris Public ... Error when try to make...
Read more >
Unable to load iris package using "import iris" giving Runtime ...
But does anyone have the secret command that will allow me to run the iris examples or simply use the iris package from...
Read more >
Common installation / update problems - IRIS Software
This error occurs when the installation is attempted by a user without full permissions to the installation folder. Either have your IT support/Administrator ......
Read more >
Blue Iris can't connect on LAN Network | IP Cam Talk
I have deleted the app a couple of times, but still nothing. I also do not have BI under Local Network. Edit for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found