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.

KeyError while using allure-pytest and xdist together

See original GitHub issue

I’m submitting a …

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

KeyError is raised when used both command line parameters -n and --alluredir

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

test_file.py

def test_allure_dir():
    assert True

Run with --alluredir and -n #treads option leads to the following error

INTERNALERROR>   File "/home/user/venv/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/home/user/venv/lib/python3.6/site-packages/allure_pytest/listener.py", line 205, in pytest_runtest_logfinish
INTERNALERROR>     uuid = self._cache.pop(nodeid)
INTERNALERROR>   File "/home/user/venv/lib/python3.6/site-packages/allure_pytest/listener.py", line 261, in pop
INTERNALERROR>     return self._items.pop(str(_id))
INTERNALERROR> KeyError: 'test_file.py::test_allure_dir'

While other tests wasn’t started either

What is the expected behavior?

All tests must be collected and runned

Please tell us about your environment:

  • Allure version: 2.4.1
  • Test framework: pytest@4.4.0
  • Allure adaptor: allure-pytest@2.6.2

Other information

With allure-pytest version 2.5.4 tests was successfully passed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
symonkcommented, Apr 23, 2019

ok thanks @marcos-alfredo perhaps i made a mistake on the version, will double check tonight after work

1reaction
marcos-alfredocommented, Apr 23, 2019

We are also seeing this issue but the last working version for us is 2.6.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - KeyError while using allure-pytest and xdist together -
KeyError while using allure-pytest and xdist together · I'm submitting a ... · What is the current behavior? · If the current behavior...
Read more >
KeyError in allure-pytest-bdd when executing test with
I'm using pytest-6.2.4 for test automation with plugins allure-pytest-bdd-2.8.36, bdd-4.0.2. Python version is 3.6.9. KeyError occurs when ...
Read more >
pytest Documentation - Read the Docs
When distributing tests on the local machine using pytest-xdist, care is taken to automatically configure a basetemp.
Read more >
Tavern Documentation
allure-pytest to your Pip dependencies and pass the --alluredir=<dir> flag when running Tavern. This will produce a test report with the ...
Read more >
Fixing KeyError Exceptions in Python - YouTube
When you encounter a KeyError, there are a few standard ways to handle it. Depending on your use case, some of these solutions...
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