Title: Startup error: occasional "AssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'" · Issue #19477 · python/mypy · GitHub
Open Graph Title: Startup error: occasional "AssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'" · Issue #19477 · python/mypy
X Title: Startup error: occasional "AssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'" · Issue #19477 · python/mypy
Description: I have been getting an odd/flaky mypy bug in a specific environment on Mac OSx. I am hoping someone can point me in the direction to better troubleshoot it and make a proper report. MyPy crashes on start with this; full details are below...
Open Graph Description: I have been getting an odd/flaky mypy bug in a specific environment on Mac OSx. I am hoping someone can point me in the direction to better troubleshoot it and make a proper report. MyPy crashes on...
X Description: I have been getting an odd/flaky mypy bug in a specific environment on Mac OSx. I am hoping someone can point me in the direction to better troubleshoot it and make a proper report. MyPy crashes on...
Opengraph URL: https://github.com/python/mypy/issues/19477
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Startup error: occasional \"AssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'\"","articleBody":"I have been getting an odd/flaky mypy bug in a specific environment on Mac OSx. I am hoping someone can point me in the direction to better troubleshoot it and make a proper report.\n\nMyPy crashes on start with this; full details are below:\n\n```\n File \"mypy/lookup.py\", line 53, in lookup_fully_qualified\nAssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'\n```\n\nAssuming I have the following filepath:\n\n /project/src/level1/level2/level3/foo.py\n\nRunning mypy on the following will trigger the issue:\n\n /project/src/level1/level2/level3/*.py\n /project/src/level1/level2/level3\n /project/src/level1/level2\n\nRunning mypy on the following will NOT trigger the issue:\n\n /project/src/level1\n /project/src\n /project\n\nSomehow broadening scope fixes this(?!?)\n\nI uninstalled and reinstalled MyPy and pyopenssl, no luck.\n\nI uninstalled and reinstalled MyPy with `--no-binary` to start pdb debugging against, but can't figure out where anything involved in triggering this is picked up from.\n\nIf anyone can offer a suggestion on where I can start poking around, I would be very appreciative. I've lost a quite bit of efficiency today.\n\nThanks!\n\n```\n main()\n File \"mypy/main.py\", line 127, in main\n File \"mypy/main.py\", line 211, in run_build\n File \"mypy/build.py\", line 191, in build\n File \"mypy/build.py\", line 267, in _build\n File \"mypy/build.py\", line 2939, in dispatch\n File \"mypy/build.py\", line 3330, in process_graph\n File \"mypy/build.py\", line 3411, in process_fresh_modules\n File \"mypy/build.py\", line 2107, in fix_cross_refs\n File \"mypy/fixup.py\", line 52, in fixup_module\n File \"mypy/fixup.py\", line 157, in visit_symbol_table\n File \"mypy/fixup.py\", line 72, in visit_type_info\n File \"mypy/fixup.py\", line 159, in visit_symbol_table\n File \"mypy/nodes.py\", line 965, in accept\n File \"mypy/fixup.py\", line 183, in visit_decorator\n File \"mypy/nodes.py\", line 851, in accept\n File \"mypy/fixup.py\", line 167, in visit_func_def\n File \"mypy/types.py\", line 2028, in accept\n File \"mypy/fixup.py\", line 269, in visit_callable_type\n File \"mypy/types.py\", line 2991, in accept\n File \"mypy/fixup.py\", line 361, in visit_union_type\n File \"mypy/types.py\", line 1488, in accept\n File \"mypy/fixup.py\", line 233, in visit_instance\n File \"mypy/fixup.py\", line 370, in lookup_fully_qualified_typeinfo\n File \"mypy/lookup.py\", line 53, in lookup_fully_qualified\nAssertionError: Cannot find component 'SSL' for 'OpenSSL.SSL.Context'\n```\n","author":{"url":"https://github.com/jvanasco","@type":"Person","name":"jvanasco"},"datePublished":"2025-07-17T20:17:32Z","url":"https://github.com/python/mypy/issues/19477"}
| 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:68101ee2-bb62-f851-8f8f-bb57ac711b0a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94BE:B7CF9:2C8B83:3BF62B:6B00253A |
| html-safe-nonce | 0cf3fdc053cd1d46ae9c8ff88717e849c76e358b2eefaeec44cde10fcfa87509 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEJFOkI3Q0Y5OjJDOEI4MzozQkY2MkI6NkIwMDI1M0EiLCJ2aXNpdG9yX2lkIjoiNTE4MTkxNzk0NDY2NTM1MTQ4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 78f7584f107e7b7a0bc694e13322102f06f98b63ae6c2bbba4a78fcecfc3e804 |
| hovercard-subject-tag | issue:3240793617 |
| 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/19477/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c0841eab47a13faab5fc0811c27c7f348028b0e70e620219d738fa567404602/python/mypy/issues/19477 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c0841eab47a13faab5fc0811c27c7f348028b0e70e620219d738fa567404602/python/mypy/issues/19477 |
| og:image:alt | I have been getting an odd/flaky mypy bug in a specific environment on Mac OSx. I am hoping someone can point me in the direction to better troubleshoot it and make a proper report. MyPy crashes on... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jvanasco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width