Title: mypy crashes with "Cannot find component" on subsequent runs · Issue #18751 · python/mypy · GitHub
Open Graph Title: mypy crashes with "Cannot find component" on subsequent runs · Issue #18751 · python/mypy
X Title: mypy crashes with "Cannot find component" on subsequent runs · Issue #18751 · python/mypy
Description: Crash Report Running mypy after the first run sometimes crashes. rm -rf .mypy_cache fixes the issue, but if I then run mypy a few more times, it crashes again. Traceback $ mypy Traceback (most recent call last): File "/path/to/mypy/mypy"...
Open Graph Description: Crash Report Running mypy after the first run sometimes crashes. rm -rf .mypy_cache fixes the issue, but if I then run mypy a few more times, it crashes again. Traceback $ mypy Traceback (most rece...
X Description: Crash Report Running mypy after the first run sometimes crashes. rm -rf .mypy_cache fixes the issue, but if I then run mypy a few more times, it crashes again. Traceback $ mypy Traceback (most rece...
Opengraph URL: https://github.com/python/mypy/issues/18751
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy crashes with \"Cannot find component\" on subsequent runs","articleBody":"**Crash Report**\n\nRunning `mypy` after the first run sometimes crashes.\n\n`rm -rf .mypy_cache` fixes the issue, but if I then run `mypy` a few more times, it crashes again.\n\n**Traceback**\n\n```\n$ mypy\nTraceback (most recent call last):\nFile \"/path/to/mypy/mypy\", line 8, in \u003cmodule> sys.exit(console_entry())\nFile \"/path/to/mypy/_-main_-.py\",line 15, in console_entry main(\nFile \"mypy/main.py\", line 119, in main\nFile \"mypy/main.py\"\nFile \"mypy/build.py\"\n, line 203, in run_build , line 191, in build\nFile \"mypy/build.py\", line 267, in _build File \"mypy/build.py\", line 2937, in dispatch\nFile \"mypy/build.py\" , line 3328, in process-graph\nFile \"mypy/build.py\",\nFile '\n\"mypy/build.py\"\nline 3409, in process_fresh-modules , line 2107, in fix_cross_refs\nFile \"mypy/fixup.py\" , line 52, in fixup-module\nFile\n\"mypy/fixup.py\" , line 128, in visit_symbol_table\nFile \"mypy/lookup.py\", line 49, in lookup_fully_qualified\nAssertionError: Cannot find component 'operators' for 'sqlalchemy.sql.operators'\n```\n\n**To Reproduce**\n\nThis is at work, and it's a rather large repo, so I can't provide easy repro steps. I would be happy to provide additional information that you need. \n\n**Your Environment**\n\n\n- Mypy version used: v1.15.0\n- Mypy command-line flags: \n- Mypy configuration options from `mypy.ini` (and other config files):\n\n```\n[mypy]\nmypy_path = server/python_stubs,server\n\nfiles = server/,test/\n\nexplicit_package_bases = True\nenable_incomplete_feature=InlineTypedDict\n\nstrict = True\nwarn_return_any = False\ndisallow_untyped_calls = False\nno_implicit_reexport = False\nwarn_unreachable = True\nplugins = pydantic.mypy\n```\n\nAdditionally, we added `ignore_missing_imports` to most of our libraries.\n\n\n- Python version used:\n- python 3.11.11\n- Operating system and version:\n- macOS ventura","author":{"url":"https://github.com/johnfn","@type":"Person","name":"johnfn"},"datePublished":"2025-03-03T17:57:38Z","url":"https://github.com/python/mypy/issues/18751"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4ce083db-c508-bc65-cb26-5257d6190694 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9BF0:142FA7:4C2B93:666777:6B002E6C |
| html-safe-nonce | fb40597966b8ad0e9789cc9caf5d786c29ee0a30fd2674a541c935307927d084 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkYwOjE0MkZBNzo0QzJCOTM6NjY2Nzc3OjZCMDAyRTZDIiwidmlzaXRvcl9pZCI6IjEwMjc1NTIxNDExNzYyMjEyOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ca290c306e2cc3db1d98bc40633c0760f2720d220505009e79494f89a3aa9415 |
| hovercard-subject-tag | issue:2891923022 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/18751/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60950a5f9d0c706f982871dc7e0c654433867bb085afde046cce7fb077716df6/python/mypy/issues/18751 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60950a5f9d0c706f982871dc7e0c654433867bb085afde046cce7fb077716df6/python/mypy/issues/18751 |
| og:image:alt | Crash Report Running mypy after the first run sometimes crashes. rm -rf .mypy_cache fixes the issue, but if I then run mypy a few more times, it crashes again. Traceback $ mypy Traceback (most rece... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnfn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width