I ran openhands after installing it with `uv tool ...
# questions
l
I ran openhands after installing it with
uv tool install openhands --python 3.12
and I am seeing an error:
Copy code
...
  File "/app/openhands/app_server/utils/logger.py", line 27, in <module>
    import aifc
ModuleNotFoundError: No module named 'aifc'
I checked the version used by the
openhands
script, which points to:
Copy code
/Users/jeffmay/.local/share/uv/tools/openhands/bin/python --version
Python 3.12.13
According to the comment in the code, it sounds like this module was removed in Python 3.13, but the version I'm using is 3.12.13
Copy code
# Suppress deprecation warnings from dependencies before they're imported
# aifc was removed in Python 3.13 but speech_recognition still references it
with warnings.catch_warnings():
    warnings.simplefilter('ignore')
    import aifc

    # Stop the linter from deleting the import
    _AIFC = aifc.__name__
I am also able to import it in the version of Python the script is using:
Copy code
>>> import aifc
<stdin>:1: DeprecationWarning: 'aifc' is deprecated and slated for removal in Python 3.13
This makes me think that the version of Python is actually coming from the image (docker.openhands.dev/openhands/openhands:latest sha256:7b5ff43040d1e249b7a2d1c84637dfb16bf69e8efe8a6970be169d00303d21dd). When I check this history on the image, I see Python 3.13:
Copy code
docker image history 7b5ff43040d1e249b7a2d1c84637dfb16bf69e8efe8a6970be169d00303d21dd | grep -i python
<missing>      9 months ago   CMD ["python3"]                                 0B        buildkit.dockerfile.v0
<missing>      9 months ago   ENV PYTHON_SHA256=5462f9099dfd30e238def83c71…   0B        buildkit.dockerfile.v0
<missing>      9 months ago   ENV PYTHON_VERSION=3.13.7                       0B        buildkit.dockerfile.v0
• Was there a recent change that could have pulled in Python 3.13? • Is the
aifc
module still needed in Python 3.13 or above? If not, shouldn't there be an if guard around the block that checks the current version of Python?
Copy code
if sys.version_info < (3, 13):
    with warnings.catch_warnings():
        warnings.simplefilter('ignore')
        import aifc

        # Stop the linter from deleting the import
        _AIFC = aifc.__name__
g
Hey Jeff I will ask @nutritious-balloon-65098 to take a look at the above message and see if you can help
c
i am also getting the same error message when trying to start open hands with the local gui command 'openhands serve'
m
Hey @lemon-pilot-49363 thanks for pointing this out. I searched a bit and I found that there is already an issue open for that ( ref. #14591) that we should probably address. There is also a PR open for that but not so happy about the solution as I think that we should just delete the block. I opened another PR for that: https://github.com/OpenHands/OpenHands/pull/14593 I will take care that will be merged ASAP šŸ˜‰
šŸ‘ 1
ty 2
g
@creamy-state-40879 if you are looking to for the local gui we are moving towards the #C06QT0AGY4W you may want to check out https://github.com/OpenHands/agent-canvas It is going into Beta next week but will eventually be THE local gui.
c
i tried to launch the agent canvas with the docker command provided and got 3 pages of errors instead of just that one big error from openhands serve. @gentle-apple-32922
šŸ‘€ 1
g
Let me open a new thread with us @creamy-state-40879 to reduce pings on this thread
c
Y'all gotta start doing a "Does it Launch" check for all the versions of openhands before pushing your changes. windows users not being able to access open hands for a week plus while we wait for several lines of code to be changed is not very ideal in the slightest or fair, I thought this kind of issue would be of much higher priority to fix 😭. A company could have been using this software just for it to completely break for a week for a single module missing.
e
Hi Enim, sorry for the issues - just to confirm, are you running into this issue with agent-canvas, or when you're using Local GUI with
openhands serve
? • For the
openhands serve
issue, it looks like a fix has been merged, but may not have been released yet. • If you're having issues with running agent-canvas, please free free to open a bug in the agent-canvas repo and we can take a look! The project is BETA so might have some compatibility issues.
c
@elegant-branch-54423 i was mainly using the local gui command. I was only trying the agent canvas command bc Jamie said to try it. It looks like openhands serve is working now though.
šŸ™Œ 2
e
Glad openhands serve is working for you!
g
I apologize for all the frustration you've experienced @creamy-state-40879 we'll review it šŸ‘ I am glad openhands serve is working now