pytest-parallel icon indicating copy to clipboard operation
pytest-parallel copied to clipboard

INTERNALERROR> RuntimeError: pytest-parallel got 20 errors, raising the first from Thread-7.

Open aditya123456 opened this issue 4 years ago • 6 comments

platform linux -- Python 3.7.5, pytest-5.3.4, py-1.8.1, pluggy-0.13.1 I suddenly started getting below error in my git lab CI pipeline .

INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pytest_parallel/init.py", line 86, in run INTERNALERROR> run_test(self.session, item, None) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pytest_parallel/init.py", line 51, in run_test INTERNALERROR> item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 182, in _multicall INTERNALERROR> next(gen) # first yield INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pytest_reportportal/listener.py", line 36, in pytest_runtest_protocol INTERNALERROR> item_id = self.PyTestService.start_pytest_item(item) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pytest_reportportal/service.py", line 232, in start_pytest_item INTERNALERROR> self.parent_item_id = self._hier_parts[part]["item_id"] INTERNALERROR> KeyError: 'item_id' INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/_pytest/main.py", line 197, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/_pytest/main.py", line 247, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/builds/core-tech/tools/qa/cstudio_automation/venv/lib/python3.7/site-packages/pytest_parallel/init.py", line 397, in pytest_runtestloop INTERNALERROR> six.raise_from(exc, err[1]) INTERNALERROR> File "", line 3, in raise_from INTERNALERROR> RuntimeError: pytest-parallel got 20 errors, raising the first from Thread-7.

aditya123456 avatar Apr 29 '20 18:04 aditya123456

Please update to 0.1.0 and try again.

kevlened avatar Apr 30 '20 18:04 kevlened

FWIW:

About a year after this issue was reported, I'm still getting this error with all latest packages:

$ python3 -m pip freeze | grep pytest
pytest==6.2.4
pytest-aiohttp==0.3.0
pytest-asyncio==0.15.1
pytest-email==0.3
pytest-forked==1.3.0
pytest-html==3.1.1
pytest-metadata==1.11.0
pytest-parallel==0.1.0
pytest-runner==5.3.0
pytest-sugar==0.9.4
pytest-timeout==1.4.2
pytest-xdist==2.2.1

arielf avatar May 13 '21 07:05 arielf

I am getting a different error - AttributeError: Can't pickle local object 'ArgumentParser.init..identity' and EOFError: Ran out of input

plugins: bdd-4.0.2, forked-1.3.0, html-3.1.1, html-reporter-0.2.6, metadata-1.11.0, parallel-0.1.0, xdist-2.3.0 collected 2 items pytest-parallel: 1 worker (process), 2 tests per worker (threads) INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages_pytest\main.py", line 269, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages_pytest\main.py", line 323, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\hooks.py", line 286, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pluggy\callers.py", line 187, in multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File ".virtualenvs\python-pytest-mr85e9qf\lib\site-packages\pytest_parallel_init.py", line 302, in pytest_runtestloop INTERNALERROR> process.start() INTERNALERROR> File "\python377\lib\multiprocessing\process.py", line 112, in start INTERNALERROR> self._popen = self._Popen(self) INTERNALERROR> File "\python377\lib\multiprocessing\context.py", line 223, in _Popen INTERNALERROR> return _default_context.get_context().Process._Popen(process_obj) INTERNALERROR> File "\python377\lib\multiprocessing\context.py", line 322, in _Popen INTERNALERROR> return Popen(process_obj) INTERNALERROR> File "\python377\lib\multiprocessing\popen_spawn_win32.py", line 89, in init INTERNALERROR> reduction.dump(process_obj, to_child) INTERNALERROR> File "\python377\lib\multiprocessing\reduction.py", line 60, in dump INTERNALERROR> ForkingPickler(file, protocol).dump(obj) INTERNALERROR> AttributeError: Can't pickle local object 'ArgumentParser.init..identity'

=================================================== no tests ran in 0.33s ==================================================== Traceback (most recent call last): File "", line 1, in File "\python377\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "\python377\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input

pipenv graph

pytest-bdd==4.0.2

  • glob2 [required: Any, installed: 0.7]
  • Mako [required: Any, installed: 1.1.4]
    • MarkupSafe [required: >=0.9.2, installed: 2.0.1]
  • parse [required: Any, installed: 1.19.0]
  • parse-type [required: Any, installed: 0.5.2]
    • parse [required: >=1.8.4, installed: 1.19.0]
    • six [required: >=1.11, installed: 1.16.0]
  • py [required: Any, installed: 1.10.0]
  • pytest [required: >=4.3, installed: 6.2.4]
    • atomicwrites [required: >=1.0, installed: 1.4.0]
    • attrs [required: >=19.2.0, installed: 21.2.0]
    • colorama [required: Any, installed: 0.4.4]
    • importlib-metadata [required: >=0.12, installed: 4.5.0]
      • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
      • zipp [required: >=0.5, installed: 3.4.1]
    • iniconfig [required: Any, installed: 1.1.1]
    • packaging [required: Any, installed: 20.9]
      • pyparsing [required: >=2.0.2, installed: 2.4.7]
    • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
    • py [required: >=1.8.2, installed: 1.10.0]
    • toml [required: Any, installed: 0.10.2]
  • six [required: >=1.9.0, installed: 1.16.0] pytest-html==3.1.1
  • pytest [required: >=5.0,!=6.0.0, installed: 6.2.4]
    • atomicwrites [required: >=1.0, installed: 1.4.0]
    • attrs [required: >=19.2.0, installed: 21.2.0]
    • colorama [required: Any, installed: 0.4.4]
    • importlib-metadata [required: >=0.12, installed: 4.5.0]
      • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
      • zipp [required: >=0.5, installed: 3.4.1]
    • iniconfig [required: Any, installed: 1.1.1]
    • packaging [required: Any, installed: 20.9]
      • pyparsing [required: >=2.0.2, installed: 2.4.7]
    • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
    • py [required: >=1.8.2, installed: 1.10.0]
    • toml [required: Any, installed: 0.10.2]
  • pytest-metadata [required: Any, installed: 1.11.0]
    • pytest [required: >=2.9.0, installed: 6.2.4]
      • atomicwrites [required: >=1.0, installed: 1.4.0]
      • attrs [required: >=19.2.0, installed: 21.2.0]
      • colorama [required: Any, installed: 0.4.4]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
      • iniconfig [required: Any, installed: 1.1.1]
      • packaging [required: Any, installed: 20.9]
        • pyparsing [required: >=2.0.2, installed: 2.4.7]
      • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
        • importlib-metadata [required: >=0.12, installed: 4.5.0]
          • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
          • zipp [required: >=0.5, installed: 3.4.1]
      • py [required: >=1.8.2, installed: 1.10.0]
      • toml [required: Any, installed: 0.10.2] pytest-html-reporter==0.2.6
  • Pillow [required: Any, installed: 8.2.0]
  • pytest [required: Any, installed: 6.2.4]
    • atomicwrites [required: >=1.0, installed: 1.4.0]
    • attrs [required: >=19.2.0, installed: 21.2.0]
    • colorama [required: Any, installed: 0.4.4]
    • importlib-metadata [required: >=0.12, installed: 4.5.0]
      • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
      • zipp [required: >=0.5, installed: 3.4.1]
    • iniconfig [required: Any, installed: 1.1.1]
    • packaging [required: Any, installed: 20.9]
      • pyparsing [required: >=2.0.2, installed: 2.4.7]
    • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
    • py [required: >=1.8.2, installed: 1.10.0]
    • toml [required: Any, installed: 0.10.2] pytest-parallel==0.1.0
  • pytest [required: >=3.0.0, installed: 6.2.4]
    • atomicwrites [required: >=1.0, installed: 1.4.0]
    • attrs [required: >=19.2.0, installed: 21.2.0]
    • colorama [required: Any, installed: 0.4.4]
    • importlib-metadata [required: >=0.12, installed: 4.5.0]
      • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
      • zipp [required: >=0.5, installed: 3.4.1]
    • iniconfig [required: Any, installed: 1.1.1]
    • packaging [required: Any, installed: 20.9]
      • pyparsing [required: >=2.0.2, installed: 2.4.7]
    • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
    • py [required: >=1.8.2, installed: 1.10.0]
    • toml [required: Any, installed: 0.10.2]
  • tblib [required: Any, installed: 1.7.0] pytest-xdist==2.3.0
  • execnet [required: >=1.1, installed: 1.9.0]
  • pytest [required: >=6.0.0, installed: 6.2.4]
    • atomicwrites [required: >=1.0, installed: 1.4.0]
    • attrs [required: >=19.2.0, installed: 21.2.0]
    • colorama [required: Any, installed: 0.4.4]
    • importlib-metadata [required: >=0.12, installed: 4.5.0]
      • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
      • zipp [required: >=0.5, installed: 3.4.1]
    • iniconfig [required: Any, installed: 1.1.1]
    • packaging [required: Any, installed: 20.9]
      • pyparsing [required: >=2.0.2, installed: 2.4.7]
    • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
    • py [required: >=1.8.2, installed: 1.10.0]
    • toml [required: Any, installed: 0.10.2]
  • pytest-forked [required: Any, installed: 1.3.0]
    • py [required: Any, installed: 1.10.0]
    • pytest [required: >=3.10, installed: 6.2.4]
      • atomicwrites [required: >=1.0, installed: 1.4.0]
      • attrs [required: >=19.2.0, installed: 21.2.0]
      • colorama [required: Any, installed: 0.4.4]
      • importlib-metadata [required: >=0.12, installed: 4.5.0]
        • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
        • zipp [required: >=0.5, installed: 3.4.1]
      • iniconfig [required: Any, installed: 1.1.1]
      • packaging [required: Any, installed: 20.9]
        • pyparsing [required: >=2.0.2, installed: 2.4.7]
      • pluggy [required: >=0.12,<1.0.0a1, installed: 0.13.1]
        • importlib-metadata [required: >=0.12, installed: 4.5.0]
          • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
          • zipp [required: >=0.5, installed: 3.4.1]
      • py [required: >=1.8.2, installed: 1.10.0]
      • toml [required: Any, installed: 0.10.2] selenium==3.141.0
  • urllib3 [required: Any, installed: 1.26.5] virtualenv==20.4.7
  • appdirs [required: >=1.4.3,<2, installed: 1.4.4]
  • distlib [required: >=0.3.1,<1, installed: 0.3.2]
  • filelock [required: >=3.0.0,<4, installed: 3.0.12]
  • importlib-metadata [required: >=0.12, installed: 4.5.0]
    • typing-extensions [required: >=3.6.4, installed: 3.10.0.0]
    • zipp [required: >=0.5, installed: 3.4.1]
  • six [required: >=1.9.0,<2, installed: 1.16.0]

iamtech123 avatar Jun 21 '21 08:06 iamtech123

$ python -m pip freeze | grep pytest allure-pytest==2.11.1 pylint-pytest==1.1.2 pytest==7.1.3 pytest-parallel==0.1.1 pytest-pycharm==0.7.0

============================= test session starts ============================== platform linux -- Python 3.9.15, pytest-7.1.3, pluggy-1.0.0 -- /usr/local/bin/python cachedir: .pytest_cache rootdir: /builds/ocean/enablers/ocean-testbot/cdr/tests, configfile: pytest.ini plugins: allure-pytest-2.11.1, pycharm-0.7.0, parallel-0.1.1 collecting ... collected 9 items pytest-parallel: 2 workers (processes), 5 tests per worker (threads) INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/allure_pytest/listener.py", line 78, in pytest_runtest_protocol INTERNALERROR> self.allure_logger.schedule_test(uuid, test_result) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/allure_commons/reporter.py", line 114, in schedule_test INTERNALERROR> self._items[uuid] = test_case INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/allure_commons/reporter.py", line 30, in setitem INTERNALERROR> self.thread_context.setitem(key, value) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/allure_commons/reporter.py", line 21, in thread_context INTERNALERROR> uuid, last_item = next(reversed(self._thread_context[self._init_thread].items())) INTERNALERROR> StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_parallel/init.py", line 93, in run INTERNALERROR> run_test(self.session, item, None) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_parallel/init.py", line 54, in run_test INTERNALERROR> item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 34, in _multicall INTERNALERROR> next(gen) # first yield INTERNALERROR> RuntimeError: generator raised StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 268, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 322, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_parallel/init.py", line 334, in pytest_runtestloop INTERNALERROR> six.raise_from(exc, err[1]) INTERNALERROR> File "", line 3, in raise_from INTERNALERROR> RuntimeError: pytest-parallel got 9 errors, raising the first from Thread-2.

rafalf avatar Oct 24 '22 10:10 rafalf

I got same error as @rafalf , the only difference is line number Python: 3.7.15 pytest 6.2.5 pytest-parallel 0.1.1 os: CentOS Linux release 7.9.2009 (Core). It's a virtual machine.

Before using pytest-parallel 0.1.1, I used v0.0.10, but no testcase get executed. Meanwhile I have an old environment with same os version and same python,pytest, pytest-parallel(0.0.10), it works fine(it's a physical server).

error with pytest-parallel 0.1.1 INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/allure_pytest/listener.py", line 78, in pytest_runtest_protocol INTERNALERROR> self.allure_logger.schedule_test(uuid, test_result) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/allure_commons/reporter.py", line 114, in schedule_test INTERNALERROR> self._items[uuid] = test_case INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/allure_commons/reporter.py", line 30, in setitem INTERNALERROR> self.thread_context.setitem(key, value) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/allure_commons/reporter.py", line 21, in thread_context INTERNALERROR> uuid, last_item = next(reversed(self._thread_context[self._init_thread].items())) INTERNALERROR> StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pytest_parallel/init.py", line 93, in run INTERNALERROR> run_test(self.session, item, None) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pytest_parallel/init.py", line 54, in run_test INTERNALERROR> item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_callers.py", line 34, in _multicall INTERNALERROR> next(gen) # first yield INTERNALERROR> RuntimeError: generator raised StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/_pytest/main.py", line 269, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/_pytest/main.py", line 323, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/app/anaconda3/envs/automation/lib/python3.7/site-packages/pytest_parallel/init.py", line 334, in pytest_runtestloop INTERNALERROR> six.raise_from(exc, err[1]) INTERNALERROR> File "", line 3, in raise_from INTERNALERROR> RuntimeError: pytest-parallel got 80 errors, raising the first from Thread-2.

olivia2046 avatar Feb 22 '23 08:02 olivia2046

i got the same question how to sovle this problem? ========================================================================================================= test session starts ========================================================================================================== platform darwin -- Python 3.10.9, pytest-7.2.2, pluggy-1.0.0 -- /Users//PycharmProjects/my_project/cube_test/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.10.9', 'Platform': 'macOS-12.3.1-x86_64-i386-64bit', 'Packages': {'pytest': '7.2.2', 'pluggy': '1.0.0'}, 'Plugins': {'html': '3.2.0', 'parallel': '0.1.1', 'allure-pytest': '2.13.5', 'ordering': '0.6', 'Faker': '19.10.0', 'xdist': '3.5.0', 'metadata': '2.0.4'}, 'JAVA_HOME': '/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home'} rootdir: /Users//PycharmProjects/my_project/cube_test, configfile: pytest.ini plugins: html-3.2.0, parallel-0.1.1, allure-pytest-2.13.5, ordering-0.6, Faker-19.10.0, xdist-3.5.0, metadata-2.0.4 collected 18 items
pytest-parallel: 1 worker (process), 4 tests per worker (threads) INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/allure_pytest/listener.py", line 88, in pytest_runtest_protocol INTERNALERROR> self.allure_logger.schedule_test(uuid, test_result) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/allure_commons/reporter.py", line 114, in schedule_test INTERNALERROR> self._items[uuid] = test_case INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/allure_commons/reporter.py", line 30, in setitem INTERNALERROR> self.thread_context.setitem(key, value) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/allure_commons/reporter.py", line 21, in thread_context INTERNALERROR> uuid, last_item = next(reversed(self._thread_context[self._init_thread].items())) INTERNALERROR> StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pytest_parallel/init.py", line 93, in run INTERNALERROR> run_test(self.session, item, None) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pytest_parallel/init.py", line 54, in run_test INTERNALERROR> item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 34, in _multicall INTERNALERROR> next(gen) # first yield INTERNALERROR> RuntimeError: generator raised StopIteration INTERNALERROR> INTERNALERROR> The above exception was the direct cause of the following exception: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/_pytest/main.py", line 270, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/_pytest/main.py", line 324, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/Users//PycharmProjects/my_project/cube_test/.venv/lib/python3.10/site-packages/pytest_parallel/init.py", line 334, in pytest_runtestloop INTERNALERROR> six.raise_from(exc, err[1]) INTERNALERROR> File "", line 3, in raise_from INTERNALERROR> RuntimeError: pytest-parallel got 18 errors, raising the first from Thread-2.

ljxpython avatar Apr 07 '24 11:04 ljxpython