René's URL Explorer Experiment


Title: dmypy: ValueError: value is not in list when running a second time · Issue #12744 · python/mypy · GitHub

Open Graph Title: dmypy: ValueError: value is not in list when running a second time · Issue #12744 · python/mypy

X Title: dmypy: ValueError: value is not in list when running a second time · Issue #12744 · python/mypy

Description: I've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950. sometimes it isn't happening at all, and other times, like at the moment, I get this stack trace reliably on any second run of dympy. Typicall...

Open Graph Description: I've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950. sometimes it isn't happening at all, and other times, like at the moment, I get this stack trace relia...

X Description: I've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950. sometimes it isn't happening at all, and other times, like at the moment, I get this stack tra...

Opengraph URL: https://github.com/python/mypy/issues/12744

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"dmypy: ValueError: value is not in list  when running a second time","articleBody":"I've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950.  sometimes it isn't happening at all, and other times, like at the moment, I get this stack trace reliably on any second run of dympy.  Typically, once I get the files I'm typing in better shape, the error goes away.   But to get there my process is greatly slowed by dmypy crashing on every non-initial run making it mostly not useful compared to running plain mypy.\r\n\r\nreproduction steps follow below.   the crash is:\r\n\r\n\r\n```py\r\n$ dmypy  check lib\r\nDaemon crashed!\r\nTraceback (most recent call last):\r\n  File \"mypy/dmypy_server.py\", line 230, in serve\r\n  File \"mypy/dmypy_server.py\", line 273, in run_command\r\n  File \"mypy/dmypy_server.py\", line 341, in cmd_check\r\n  File \"mypy/dmypy_server.py\", line 394, in check\r\n  File \"mypy/dmypy_server.py\", line 569, in fine_grained_increment_follow_imports\r\n  File \"mypy/server/update.py\", line 245, in update\r\n  File \"mypy/server/update.py\", line 328, in update_one\r\n  File \"mypy/server/update.py\", line 393, in update_module\r\n  File \"mypy/server/update.py\", line 615, in update_module_isolated\r\n  File \"mypy/build.py\", line 2192, in type_check_first_pass\r\n  File \"mypy/checker.py\", line 319, in check_first_pass\r\n  File \"mypy/checker.py\", line 427, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checker.py\", line 425, in accept\r\n  File \"mypy/nodes.py\", line 1021, in accept\r\n  File \"mypy/checker.py\", line 1810, in visit_class_def\r\n  File \"mypy/checker.py\", line 427, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checker.py\", line 425, in accept\r\n  File \"mypy/nodes.py\", line 1092, in accept\r\n  File \"mypy/checker.py\", line 2174, in visit_block\r\n  File \"mypy/checker.py\", line 427, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checker.py\", line 425, in accept\r\n  File \"mypy/nodes.py\", line 740, in accept\r\n  File \"mypy/checker.py\", line 776, in visit_func_def\r\n  File \"mypy/checker.py\", line 780, in _visit_func_def\r\n  File \"mypy/checker.py\", line 842, in check_func_item\r\n  File \"mypy/checker.py\", line 1027, in check_func_def\r\n  File \"mypy/checker.py\", line 427, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checker.py\", line 425, in accept\r\n  File \"mypy/nodes.py\", line 1092, in accept\r\n  File \"mypy/checker.py\", line 2174, in visit_block\r\n  File \"mypy/checker.py\", line 427, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checker.py\", line 425, in accept\r\n  File \"mypy/nodes.py\", line 1316, in accept\r\n  File \"mypy/checker.py\", line 3581, in visit_if_stmt\r\n  File \"mypy/checkexpr.py\", line 3983, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checkexpr.py\", line 3981, in accept\r\n  File \"mypy/nodes.py\", line 1897, in accept\r\n  File \"mypy/checkexpr.py\", line 2244, in visit_comparison_expr\r\n  File \"mypy/checkexpr.py\", line 3983, in accept\r\n  File \"mypy/errors.py\", line 902, in report_internal_error\r\n  File \"mypy/checkexpr.py\", line 3981, in accept\r\n  File \"mypy/nodes.py\", line 1653, in accept\r\n  File \"mypy/checkexpr.py\", line 197, in visit_name_expr\r\n  File \"mypy/checkexpr.py\", line 224, in analyze_ref_expr\r\n  File \"mypy/checkmember.py\", line 969, in type_object_type\r\nValueError: value is not in list\r\n```\r\n\r\nsteps to reproduce:\r\n\r\n1. using Python 3.10.0 in case that's important\r\n2. dmypy 0.950 - this is a straight install from pypi, though ive had the issue in the past running from a source install also \r\n3. git clone SQLAlchemy from gerrit and cd into new directory:\r\n\r\n```\r\n$ git clone https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy\r\n$ cd sqlalchemy\r\n\r\n```\r\n\r\n4. download a specific patch that is reproducing the issue:\r\n\r\n```\r\n$ git fetch https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy refs/changes/25/3825/2 && git checkout FETCH_HEAD\r\n```\r\n\r\n5. start dmypy and run an initial check against lib.  there's about 50 typing errors generated as expected\r\n\r\n```\r\n$ dmypy start\r\n$ dmypy check lib\r\n... output follows ...\r\nFound 50 errors in 1 file (checked 700 source files)\r\n\r\n```\r\n\r\n6. make any change, like adding a blank line, to lib/sqlalchemy/orm/decl_api.py:\r\n\r\n```\r\n$ printf \"\\n\" >> lib/sqlalchemy/orm/decl_api.py\r\n```\r\n\r\n7. run \"dmypy recheck\".  crash\r\n\r\n```\r\n$ dympy recheck\r\n\r\n... stack trace...\r\n  File \"mypy/checkexpr.py\", line 197, in visit_name_expr\r\n  File \"mypy/checkexpr.py\", line 224, in analyze_ref_expr\r\n  File \"mypy/checkmember.py\", line 969, in type_object_type\r\nValueError: value is not in list\r\n\r\n```\r\n\r\nI'm able to reproduce this from running the steps above in a brand new directory.\r\n\r\nI fully expect there is something in my code making it do this which I am sure is some horrible mistake I'm making, however, dmypy should tell me what the mistake is rather than crashing.    Thanks and sorry for the complex reproduction instructions\r\n\r\n\r\n","author":{"url":"https://github.com/zzzeek","@type":"Person","name":"zzzeek"},"datePublished":"2022-05-07T16:15:24Z","url":"https://github.com/python/mypy/issues/12744"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f2d064e1-4331-1a6e-1f87-8fe8ff7ff439
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC13A:1B0A31:22D18A6:2F671AB:6B002CB8
html-safe-noncee275a7ed614355230b591461903ae453badbb0be7e177e040c53ae15f3f26942
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTNBOjFCMEEzMToyMkQxOEE2OjJGNjcxQUI6NkIwMDJDQjgiLCJ2aXNpdG9yX2lkIjoiMzIyMjE0MDI1ODg3OTU0ODYwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac084c95e40d94d13b5945e1a55f8295a41c8047f271e143a5e3576044e5e5b2e4
hovercard-subject-tagissue:1228664708
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/12744/issue_layout
twitter:imagehttps://opengraph.githubassets.com/02b96d5083f48d3c5b6cca0c5d13fd8e072ec7bf13a65a82ce98ef919ae923c9/python/mypy/issues/12744
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/02b96d5083f48d3c5b6cca0c5d13fd8e072ec7bf13a65a82ce98ef919ae923c9/python/mypy/issues/12744
og:image:altI've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950. sometimes it isn't happening at all, and other times, like at the moment, I get this stack trace relia...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezzzeek
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/12744#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F12744
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F12744
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/12744
Reloadhttps://github.com/python/mypy/issues/12744
Reloadhttps://github.com/python/mypy/issues/12744
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/12744
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/12744
#14104https://github.com/python/mypy/pull/14104
dmypy: ValueError: value is not in list when running a second timehttps://github.com/python/mypy/issues/12744#top
#14104https://github.com/python/mypy/pull/14104
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-daemondmypyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-daemon%22
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 7, 2022https://github.com/python/mypy/issues/12744#issue-1228664708
zzzeekhttps://github.com/zzzeek
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on May 7, 2022https://github.com/python/mypy/issues/12744#event-6567655333
AlexWaygoodhttps://github.com/AlexWaygood
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-daemondmypyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-daemon%22
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on May 7, 2022https://github.com/python/mypy/issues/12744#event-6567663124
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 7, 2022https://github.com/python/mypy/issues/12744#issuecomment-1120287334
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Nov 15, 2022https://github.com/python/mypy/issues/12744#issuecomment-1315733707
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Nov 15, 2022https://github.com/python/mypy/issues/12744#issuecomment-1315881625
@JukkaLhttps://github.com/JukkaL
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#14104https://github.com/python/mypy/pull/14104
on Nov 15, 2022https://github.com/python/mypy/issues/12744#event-7818209962
ilevkivskyihttps://github.com/ilevkivskyi
on Nov 15, 2022https://github.com/python/mypy/issues/12744#event-7818210001
Correctly process nested definitions in astmerge (#14104)https://github.com/python/mypy/commit/0d2a954a20f239cde5f958b3e757ee4daab0d8b0
#14104https://github.com/python/mypy/pull/14104
https://docs.github.com/articles/closing-issues-via-commit-messages
0d2a954https://github.com/python/mypy/commit/0d2a954a20f239cde5f958b3e757ee4daab0d8b0
sqlalchemy-bothttps://github.com/sqlalchemy-bot
on Nov 29, 2022https://github.com/python/mypy/issues/12744#event-7916838203
update for mypy 1.0 devhttps://github.com/sqlalchemy/sqlalchemy/commit/78833af4e650d37e6257cfbb541e4db56e2a285f
78833afhttps://github.com/sqlalchemy/sqlalchemy/commit/78833af4e650d37e6257cfbb541e4db56e2a285f
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on Nov 29, 2022https://github.com/python/mypy/issues/12744#issuecomment-1331448154
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Nov 30, 2022https://github.com/python/mypy/issues/12744#issuecomment-1331844598
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/12744
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/12744
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-daemondmypyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-daemon%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.