Hmm, re-cloning the repo / restarting my machine d...
# dev-help
f
Hmm, re-cloning the repo / restarting my machine did not manage to fix the error. Still getting
AttributeError: module 'httpx_aiohttp' has no attribute 'HttpxAiohttpClient'
. Could anyone else give it a shot using the latest changes and see if it runs?
m
I’m pulling the latest code from the main branch. Let me check if I encounter the same issue thankyou
After pulling the latest code from the main branch and running
make build
and
make run
, I was able to run the project successfully on my end.
thanks on a stick 1
l
Could it have something to do with third_party_packages? Found this in tests:
Copy code
# Test 2: Other exceptions should be logged
        module_path = 'third_party.runtime.impl.runloop.runloop_runtime'
        try:
            raise AttributeError(
                "module 'httpx_aiohttp' has no attribute 'HttpxAiohttpClient'"
            )
        except ImportError:
            # ImportError means the library is not installed (expected for optional dependencies)
            pass
        except Exception as e:
            # Other exceptions mean the library is present but broken, which should be logged
            # This is the exact code from runtime init
            logger.warning(f'Failed to import third-party runtime {module_path}: {e}')
If re-cloning the repo didn't fix it, I'd start by nuking all python packages.
f
Had to switch the Python env poetry was using locally. Weird since I don't remember messing around with anything Python or env related recently
l
OpenHands shouldn't load that package I think. It's not present on my devenv. Maybe you installed the third party runtimes extra package?
Copy code
vscode ➜ /workspaces/OpenHands (feat-improve-conversation-card) $ poetry show httpx-aiohttp

Package httpx-aiohttp not found
vscode ➜ /workspaces/OpenHands (feat-improve-conversation-card) $ pip show httpx-aiohttp
WARNING: Package(s) not found: httpx-aiohttp
Or maybe you still had those runtime deps installed from when those packages were a part of OpenHands. Anyway, if you use a compatible editor (like vscode), try out the devcontainer. Everything works out of the box, everything stays inside it, and if it breaks you can nuke it in an instant.
f
Yeah looked like
litellm
wasn't installed? Seemed weird. Old env didn't point out the missing dependency but the new env I switched to did
It looks like I'm starting to get this error pretty often now (
AttributeError: module 'httpx_aiohttp' has no attribute 'HttpxAiohttpClient'
) and have to switch or purge python envs every time I get it. Any clue what could have caused this?
l
You should look up what's requiring that dep. I don't seem to have it in my poetry env. I think you have the third party runtimes installed (from pip? from older CLIs maybe?) since that seems to be a dep used by those packages. Edit: If OH finds the third party runtime packages, it will try to load them.
c
We just merged a dependency update for aiohttp in main
Maybe it works now?