You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VSCode mypy keeps crashing w/ project that uses pydantic
Traceback
/home/mambauser/venvs/nmf_graphs/lib/python3.10/site-packages/fastapi/openapi/models.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.13.0
Daemon crashed!
Traceback (most recent call last):
File "mypy/dmypy_server.py", line 236, in serve
File "mypy/dmypy_server.py", line 285, in run_command
File "mypy/dmypy_server.py", line 353, in cmd_run
File "mypy/dmypy_server.py", line 427, in check
File "mypy/dmypy_server.py", line 466, in initialize_fine_grained
File "mypy/build.py", line 194, in build
File "mypy/build.py", line 269, in _build
File "mypy/build.py", line 2935, in dispatch
File "mypy/build.py", line 3333, in process_graph
File "mypy/build.py", line 3434, in process_stale_scc
File "mypy/build.py", line 2304, in type_check_first_pass
File "mypy/checker.py", line 483, in check_first_pass
File "mypy/checker.py", line 594, in accept
File "mypy/errors.py", line 1269, in report_internal_error
File "mypy/checker.py", line 592, in accept
File "mypy/nodes.py", line 1183, in accept
File "mypy/checker.py", line 2420, in visit_class_def
File "mypy/checker.py", line 594, in accept
File "mypy/errors.py", line 1269, in report_internal_error
File "mypy/checker.py", line 592, in accept
File "mypy/nodes.py", line 1264, in accept
File "mypy/checker.py", line 2886, in visit_block
File "mypy/checker.py", line 594, in accept
File "mypy/errors.py", line 1269, in report_internal_error
File "mypy/checker.py", line 592, in accept
File "mypy/nodes.py", line 1351, in accept
File "mypy/checker.py", line 2934, in visit_assignment_stmt
File "mypy/checker.py", line 3112, in check_assignment
File "mypy/checker.py", line 4271, in check_simple_assignment
File "mypy/checkexpr.py", line 5850, in accept
File "mypy/errors.py", line 1269, in report_internal_error
File "mypy/checkexpr.py", line 5848, in accept
File "mypy/nodes.py", line 1969, in accept
File "mypy/checkexpr.py", line 480, in visit_call_expr
File "mypy/checkexpr.py", line 614, in visit_call_expr_inner
File "mypy/checkexpr.py", line 1471, in check_call_expr_with_callee_type
File "mypy/checkexpr.py", line 1576, in check_call
File "mypy/checkexpr.py", line 2697, in check_overload_call
File "mypy/checkexpr.py", line 2856, in infer_overload_return_type
File "mypy/checkexpr.py", line 1565, in check_call
File "mypy/checkexpr.py", line 1811, in check_callable_call
File "mypy/checkexpr.py", line 1245, in apply_function_plugin
File "/opt/conda/lib/python3.10/site-packages/pydantic/mypy.py", line 209, in _pydantic_field_callback
assert ctx.callee_arg_names[0] == 'default', '"default" is no longer first argument in Field()'
AssertionError: "default" is no longer first argument in Field()
To Reproduce
Not sure. I think it may be due to conflicting versions of pydantic.
Your Environment
Mypy version used: 1.13.0
Mypy command-line flags:
Mypy configuration options from mypy.ini (and other config files): default
Python version used: python 3.10.15
Operating system and version: docker mambaorg/micromamba
The text was updated successfully, but these errors were encountered:
In any case, since the crash is occurring inside pydantic, this is likely an issue with pydantic and not mypy itself. If the version of pydantic you're using supports mypy v1.13, I'd recommend opening an issue on pydantic's tracker: https://github.com/pydantic/pydantic/issues.
Yeah, this is an issue with the pydantic plugin for mypy, so you should a) check whether it reproduces with latest pydantic and latest mypy, b) open on the pydantic issue tracker
Crash Report
In VSCode mypy keeps crashing w/ project that uses pydantic
Traceback
To Reproduce
Not sure. I think it may be due to conflicting versions of pydantic.
Your Environment
mypy.ini
(and other config files): defaultThe text was updated successfully, but these errors were encountered: