Skip to content

5.3.5 still got INTERNALERROR about AssertionError #6887

Closed

Description

@ycwdaaaa

the list I installed

pip list
allure-pytest 2.8.9
allure-python-commons 2.8.9
apipkg 1.5
assertpy 1.0
attrs 19.3.0
certifi 2019.11.28
chardet 3.0.4
click 7.1.1
configparser 4.0.2
coverage 5.0.3
execnet 1.7.1
fastparquet 0.3.3
Flask 1.1.1
idna 2.9
importlib-metadata 1.5.0
itsdangerous 1.1.0
Jinja2 2.11.1
llvmlite 0.31.0
loguru 0.4.1
MarkupSafe 1.1.1
more-itertools 8.2.0
numba 0.48.0
numpy 1.18.1
packaging 20.3
pandas 1.0.1
pip 20.0.2
pluggy 0.13.1
prometheus-client 0.7.1
psutil 5.7.0
py 1.8.1
pyparsing 2.4.6
pytest 5.3.1
pytest-arraydiff 0.2
pytest-assume 2.2.0
pytest-astropy 0.3.0
pytest-base-url 1.4.1
pytest-cov 2.8.1
pytest-doctestplus 0.1.3
pytest-forked 1.1.3
pytest-instafail 0.4.1.post0
pytest-metadata 1.8.0
pytest-openfiles 0.3.0
pytest-ordering 0.6
pytest-picked 0.4.1
pytest-remotedata 0.3.2
pytest-rerunfailures 8.0
pytest-sugar 0.9.2
pytest-timeout 1.3.4
pytest-variables 1.9.0
pytest-xdist 1.31.0
python-dateutil 2.7.3
pytz 2019.3
requests 2.23.0
sage-builtin-operators 3.8.2a1+20200310010827.update
sage-sdk 3.8.2a1+20200310010827.update
setuptools 45.2.0
six 1.14.0
termcolor 1.1.0
thrift 0.13.0
tzlocal 2.0.0
urllib3 1.25.8
wcwidth 0.1.8
websocket-client 0.57.0
Werkzeug 1.0.0
wheel 0.34.2
wrapt 1.12.1
zipp 3.1.0

error :
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 197, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/local/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 "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR> self.loop_once()
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR> call(**kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 177, in worker_workerfinished
INTERNALERROR> assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('sdp/test_ftptable.py::TestFtptable::test_tsv_table', )
INTERNALERROR> assert not 'sdp/test_ftptable.py::TestFtptable::test_tsv_table'

Activity

  1. nicoddemus commented on Mar 10, 2020

    @nicoddemus
    Member

    Hi @ycwdaaaa,

    What happens if you run without pytest-xdist? Do you get a different error?

  2. added
    plugin: xdistrelated to the xdist external plugin
    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity
    on Mar 10, 2020
  3. ycwdaaaa commented on Mar 11, 2020

    @ycwdaaaa
    Author

    I finally got the root cause. my team member made a mistake when use the allure like below.

    image

    the correct way is to set the story to 'Table' which is String type, but she use the existing object instead. so the error shows up.

    But the pytest's error message is Assertion Error, it's every strange~~

  4. ycwdaaaa commented on Mar 11, 2020

    @ycwdaaaa
    Author

    e....... now it same error shows up again. but I have no idea how to fix it this time.

  5. ycwdaaaa commented on Mar 11, 2020

    @ycwdaaaa
    Author

    update status. I found that if I use the pytest-instafail or I use the python3 -m pytest -v these 2 way to run pytest will happen this error。 maybe these 2 way is conflict with xdist?

  6. ycwdaaaa commented on Mar 11, 2020

    @ycwdaaaa
    Author

    update status. I got the reason, the pytest-timeout si conflict with xdist, I found the issue in github of pytest-timeout

  7. mivade commented on Mar 11, 2020

    @mivade

    I'm seeing something similar seemingly related to the pytest-flake8 plugin:

    INTERNALERROR> AttributeError: 'Flake8Item' object has no attribute 'funcargs'
    
  8. nicoddemus commented on Mar 12, 2020

    @nicoddemus
    Member

    @ycwdaaaa so is it a matter of updating pytest-timeout? If so can you close this issue please? Thanks!

    @mivade yeah that's a generic term for many possible errors... in that case I suggest to try to update pytest-flake8 (or post an issue there).

  9. The-Compiler commented on Mar 12, 2020

    @The-Compiler
    Member

    Even if the issue in pytest-timeout, it seems to me like there's some issue in pytest core or xdist about properly reporting the underlying issue, no? It probably should show some kind of proper stacktrace rather than fail an assertion inside xdist?

  10. nicoddemus commented on Mar 12, 2020

    @nicoddemus
    Member

    Definitely: pytest-dev/pytest-xdist#204

    Unfortunately nobody took the time to improve that.

  11. mivade commented on Mar 12, 2020

    @mivade

    I have tried a lot of different combinations of versions of pytest and pytest-flake8 and am having trouble finding the winning combination that works. In the end the only thing I could do was stop using pytest-flake8. It seems pretty clear to me that this is an issue with pytest itself though since similar generic errors like these are apparently happening with a variety of plugins.

  12. The-Compiler commented on Mar 12, 2020

    @The-Compiler
    Member

    Ah, I see - I suppose this can be closed then if the underlying issue is in flake8-timeout indeed.

    @mivade Your issue seems to be unrelated - I'd recommend opening an issue in the pytest-flake8 repository as you'd probably be able to reproduce this without pytest-xdist involved.

  13. mivade commented on Mar 12, 2020

    @mivade

    Will do if I can come up with a minimal, reproducible example.

  14. comilao commented on Mar 18, 2020

    @comilao

    Will do if I can come up with a minimal, reproducible example.

    Hi, to reproduce the problem. You can create a test that always fails and run with this command pytest test_always_fail.py --reruns=1

  15. pishchalnikov commented on Mar 19, 2020

    @pishchalnikov

    Using pytest-rerunfailures==9.0 should solve this problem.

  16. Zac-HD commented on Jun 9, 2020

    @Zac-HD
    Member

    Closing this as redundant with pytest-dev/pytest-xdist#204 (for reporting of errors) and downstream plugins (for the errors themselves). Thanks to everyone who helped track down what was happening 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: xdistrelated to the xdist external pluginstatus: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions