Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing LiteLLM causing crashloop in mypy vscode extension #17605

Closed
C-monC opened this issue Jul 30, 2024 · 1 comment
Closed

Installing LiteLLM causing crashloop in mypy vscode extension #17605

C-monC opened this issue Jul 30, 2024 · 1 comment
Labels

Comments

@C-monC
Copy link

C-monC commented Jul 30, 2024

Crash Report

I installed https://github.com/BerriAI/litellm and VScode mypy extension is stuck in a crash loop when parsing the file vertex_ai.py

Traceback

Daemon started
/venv/lib/python3.11/site-packages/litellm/types/llms/vertex_ai.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.11.0
Daemon crashed!
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 236, in serve
  File "mypy/dmypy_server.py", line 285, in run_command
  File "mypy/dmypy_server.py", line 353, in cmd_run
  File "mypy/dmypy_server.py", line 427, in check
  File "mypy/dmypy_server.py", line 466, in initialize_fine_grained
  File "mypy/build.py", line 193, in build
  File "mypy/build.py", line 268, in _build
  File "mypy/build.py", line 2950, in dispatch
  File "mypy/build.py", line 3348, in process_graph
  File "mypy/build.py", line 3453, in process_stale_scc
  File "mypy/build.py", line 2409, in finish_passes
  File "mypy/build.py", line 2467, in update_fine_grained_deps
  File "mypy/build.py", line 2455, in compute_fine_grained_deps
  File "mypy/server/deps.py", line 187, in get_dependencies
  File "mypy/nodes.py", line 372, in accept
  File "mypy/server/deps.py", line 250, in visit_mypy_file
  File "mypy/traverser.py", line 116, in visit_mypy_file
  File "mypy/nodes.py", line 1183, in accept
  File "mypy/server/deps.py", line 310, in visit_class_def
  File "mypy/traverser.py", line 152, in visit_class_def
  File "mypy/nodes.py", line 1264, in accept
  File "mypy/server/deps.py", line 429, in visit_block
  File "mypy/traverser.py", line 120, in visit_block
  File "mypy/nodes.py", line 1351, in accept
  File "mypy/server/deps.py", line 490, in visit_assignment_stmt
  File "mypy/server/deps.py", line 887, in add_type_dependencies
  File "mypy/server/deps.py", line 940, in get_type_triggers
  File "mypy/server/deps.py", line 947, in get_type_triggers
  File "mypy/types.py", line 2706, in accept
AssertionError

To Reproduce

pip install litellm
Edit a file in vscode and save ( assuming mypy is triggered on save)

Your Environment

  • Mypy version used: 1.11.0

  • Mypy command-line flags: dmypy --status-file '/home/msioob/.config/Code - Insiders/User/workspaceStorage/41a331d9b250640fdbc50ba2805583e2/matangover.mypy/dmypy-665fc185e6b7dca5638655d1f26d97f82014f843-515011.json' run --log-file '/home/msioob/.config/Code - Insiders/User/workspaceStorage/41a331d9b250640fdbc50ba2805583e2/matangover.mypy/dmypy-665fc185e6b7dca5638655d1f26d97f82014f843.log' -- --python-executable venv/bin/python ./api --show-error-end --no-error-summary --no-pretty --no-color-output --config-file ./api/pyproject.toml --show-traceback

  • Mypy configuration options from mypy.ini (and other config files):

[tool.mypy]
disallow_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = false
ignore_missing_imports = true
no_implicit_optional = true
no_implicit_reexport = true
implicit_reexport = true
show_error_codes = true
strict = true
strict_equality = true
strict_optional = false
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
exclude = ["^tests/test_data/", "alembic"]

[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
ignore_missing_imports = true

  • Python version used: python3.11
  • Operating system and version: ubuntu 22
@C-monC C-monC added the crash label Jul 30, 2024
@C-monC
Copy link
Author

C-monC commented Jul 30, 2024

Fixed by #17588

@C-monC C-monC closed this as completed Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant