linkedin / linkedin/iris

Error when try to make iris locally.

Open
#592 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
845
Forks
146
PR merge metrics
No merged PRs in 30d

Description

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
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
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
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
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
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

Contributor guide

Open the contributing guide

Research direction

Start with the import in src/iris/api.py and compare it with the environment used by test/test_irisapi.py and test/test_sender.py. Reproduce the failure during the local test run and Docker image creation, then verify that both test modules collect successfully without the reported ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.