Skip to content

Uncaught ImportError in http_handler.py line 10 #4643

@Tejasdavande07

Description

@Tejasdavande07

Aider version: 0.86.1
Python version: 3.12.0
Platform: Windows-11-10.0.26100-SP0
Python implementation: CPython
Virtual environment: No
OS: Windows 11 (64bit)
Git version: git version 2.42.0.windows.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 4, in <module>
    main()
  File "main.py", line 822, in main
    main_model = models.Model(
                 ^^^^^^^^^^^^^
  File "models.py", line 333, in __init__
    res = self.validate_environment()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "models.py", line 715, in validate_environment
    res = litellm.validate_environment(model)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "llm.py", line 27, in __getattr__
    self._load_litellm()
  File "llm.py", line 37, in _load_litellm
    self._lazy_module = importlib.import_module("litellm")
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "__init__.py", line 20, in <module>
    from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
  File "http_handler.py", line 10, in <module>
    from httpx import USE_CLIENT_DEFAULT, AsyncHTTPTransport, HTTPTransport
ImportError: cannot import name 'USE_CLIENT_DEFAULT' from 'httpx' (C:\Users\Tejas Davande\AppData\Roaming\Python\Python312\site-packages\httpx\__init__.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions