-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTERNALERROR: Unknown entry type returned: TraceLastReprEntry #154
Comments
Seeing the same issue, and the suggested fix (as per https://github.com/griels/pytest-mypy-plugins/tree/fix-internalerror-2 ) does indeed stop the INTERNALERROR message and present a much more readable error. I won't create a PR either, though, as clearly |
PR is very much appreciated :) |
OK, I can certainly put up my current branch as a PR, but it's just making the change @filbranden suggested. Can take a look later at TraceLasttReprEntry and try to figure out what's wrong, but I'm not familiar at all with the codebase yet! |
I'm seeing
INTERNALERROR: Unknown entry type returned: TraceLastReprEntry
with a long long unreadable traceback when running tests forpython-attrs/attrs
that produce type checker failures.This is the traceback of the exception in pytest:
It looks like
deserialize_repr_entry
in pytest code base makes a specific check for the entry type and only supports"ReprEntry"
or"ReprEntryNative"
, otherwise it throws this RuntimeError.It seems updating
pytest_mypy_plugins/item.py
to setrepr_tb_entry = ReprEntry(...)
also prevents the error from happening.In order to reproduce this issue, clone the python-attrs/attrs repo, then modify
tests/test_mypy.yml
to introduce any typing error, then runtox
ortox -e py312-tests
(quicker), the error message is very long and almost impossible to read!Thanks!
The text was updated successfully, but these errors were encountered: