Crash Report - AssertionError: Cannot find module for langchain.schema.output_parser.BaseOutputParser
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Mypy is crashing when recursively looking up the langchain package.
Traceback (most recent call last):
File "mypy/dmypy_server.py", line 234, in serve
File "mypy/dmypy_server.py", line 281, in run_command
File "mypy/dmypy_server.py", line 349, in cmd_run
File "mypy/dmypy_server.py", line 418, in check
File "mypy/dmypy_server.py", line 667, in fine_grained_increment_follow_imports
File "mypy/server/update.py", line 267, in update
File "mypy/server/update.py", line 369, in update_one
File "mypy/server/update.py", line 452, in update_module
File "mypy/server/update.py", line 881, in propagate_changes_using_dependencies
File "mypy/server/update.py", line 1010, in reprocess_nodes
File "mypy/semanal_main.py", line 148, in semantic_analysis_for_targets
File "mypy/semanal_main.py", line 439, in apply_class_plugin_hooks
File "mypy/semanal_main.py", line 484, in apply_hooks_to_class
File "mypy/plugins/dataclasses.py", line 231, in transform
File "mypy/plugins/dataclasses.py", line 529, in collect_attributes
File "mypy/plugins/dataclasses.py", line 190, in deserialize
File "mypy/plugins/common.py", line 342, in deserialize_and_fixup_type
File "mypy/types.py", line 2714, in accept
File "mypy/fixup.py", line 337, in visit_union_type
File "mypy/types.py", line 1414, in accept
File "mypy/fixup.py", line 212, in visit_instance
File "mypy/fixup.py", line 349, in lookup_fully_qualified_typeinfo
File "mypy/lookup.py", line 31, in lookup_fully_qualified
AssertionError: Cannot find module for langchain.schema.output_parser.BaseOutputParser
[101] Error running mypy in /Users/shroominic/projects/neural-shirts: the mypy daemon crashed. This is probably a bug in mypy itself, see Output panel for details. The daemon will be restarted automatically.
To Reproduce
Install the langchain package (I tested between 0.0.277 and 0.0.302)
Your Environment
- Mypy version used: 1.5.1
- Python version used: 3.11.5
- Operating system and version: macos
Workaround
You can disable mypy to check the langchain package in your mypy.ini or pyproject.toml:
[[tool.mypy.overrides]]
module = "langchain"
follow_imports = "skip"
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Absturz, indem du langchain 0.0.277–0.0.302 installierst und mypy mit rekursiven Imports ausführst. Beginne mit mypy/fixup.py, mypy/lookup.py und dem im Traceback gezeigten dataclass-Plugin-Pfad. Die Aufgabe ist erledigt, wenn der Daemon beim Auflösen von langchain.schema.output_parser.BaseOutputParser keine AssertionError mehr auslöst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100