Getting this error when trying to run `make run` /...
# dev-help
f
Getting this error when trying to run
make run
/
make start-backend
๐Ÿงต
Copy code
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/Users/.../.pyenv/versions/3.12.8/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/Users/.../.pyenv/versions/3.12.8/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
    target(sockets=sockets)
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 67, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/.../.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/.../.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 71, in serve
    await self._serve(sockets)
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 78, in _serve
    config.load()
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 436, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/.../.pyenv/versions/3.12.8/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/server/listen.py", line 5, in <module>
    from openhands.server.app import app as base_app
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/server/app.py", line 15, in <module>
    import openhands.agenthub  # noqa F401 (we import this to get the agents registered)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/agenthub/__init__.py", line 6, in <module>
    from openhands.agenthub import (  # noqa: E402
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/agenthub/browsing_agent/__init__.py", line 1, in <module>
    from openhands.agenthub.browsing_agent.browsing_agent import BrowsingAgent
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/agenthub/browsing_agent/browsing_agent.py", line 6, in <module>
    from openhands.agenthub.browsing_agent.response_parser import BrowsingResponseParser
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/agenthub/browsing_agent/response_parser.py", line 4, in <module>
    from openhands.controller.action_parser import ActionParser, ResponseParser
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/controller/__init__.py", line 1, in <module>
    from openhands.controller.agent_controller import AgentController
  File "/Users/.../Desktop/All Hands AI/OpenHands/openhands/controller/agent_controller.py", line 10, in <module>
    from litellm.exceptions import (  # noqa
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/litellm/__init__.py", line 9, in <module>
    from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 16, in <module>
    from litellm.litellm_core_utils.logging_utils import track_llm_api_timing
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/litellm/litellm_core_utils/logging_utils.py", line 7, in <module>
    from litellm.types.utils import (
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/litellm/types/utils.py", line 18, in <module>
    from openai._models import BaseModel as OpenAIObject
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/openai/__init__.py", line 12, in <module>
    from ._client import Client, OpenAI, Stream, Timeout, Transport, AsyncClient, AsyncOpenAI, AsyncStream, RequestOptions
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/openai/_client.py", line 31, in <module>
    from ._base_client import (
  File "/Users/.../Library/Caches/pypoetry/virtualenvs/openhands-ai-q6lpIkNh-py3.12/lib/python3.12/site-packages/openai/_base_client.py", line 1325, in <module>
    class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient):  # type: ignore
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'httpx_aiohttp' has no attribute 'HttpxAiohttpClient'
l
Did you run
make build
first? It's working fine here.
f
Yes I have, I might have to re-clone the repo then ๐Ÿ˜•
l
By the way, I saw you just sent a frontend-related PR. The frontend tests on github are broken, see https://github.com/All-Hands-AI/OpenHands/pull/9928 Edit: and I also have another PR to fix the tests that were missed and a couple other ones I catched while running tests in a loop.
๐Ÿ‘€ 1
This should fix the tests that will fail once the workflow is fixed: https://github.com/All-Hands-AI/OpenHands/pull/9943