python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
17.97k stars 2.76k forks source link

crash with sqlalchemy2 stubs #11902

Open minyoung90 opened 2 years ago

minyoung90 commented 2 years ago

Crash Report

I can't understand log, so do you have any ideas where I can find a line for this report? I am using VSCode, vscdoe gives me this error.

Traceback

Daemon crashed!
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 229, in serve
  File "mypy/dmypy_server.py", line 272, in run_command
  File "mypy/dmypy_server.py", line 331, in cmd_run
  File "mypy/dmypy_server.py", line 393, in check
  File "mypy/dmypy_server.py", line 568, in fine_grained_increment_follow_imports
  File "mypy/server/update.py", line 245, in update
  File "mypy/server/update.py", line 328, in update_one
  File "mypy/server/update.py", line 388, in update_module
  File "mypy/server/astdiff.py", line 164, in snapshot_symbol_table
  File "mypy/server/astdiff.py", line 224, in snapshot_definition
  File "mypy/server/astdiff.py", line 160, in snapshot_symbol_table
TypeError: str object expected; got None

To Reproduce

(Write what you did to reproduce the crash. Full source code is appreciated. We also very much appreciate it if you try to narrow the source down to a small stand-alone example.)

Your Environment

JelleZijlstra commented 2 years ago

This is here: https://github.com/python/mypy/blob/master/mypy/server/astdiff.py#L160. I guess it means node.fullname is unexpectedly None, but no idea why that happens.

ethanhs commented 1 year ago

@minyoung90 can you give any more details about the source file that caused this crash?