lemon-pilot-49363
05/28/2026, 7:25 PMuv tool install openhands --python 3.12 and I am seeing an error:
...
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:
/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
# 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:
>>> 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:
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?
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__gentle-apple-32922
05/28/2026, 9:41 PMcreamy-state-40879
05/28/2026, 10:29 PMmodern-fireman-99755
05/29/2026, 8:52 AMgentle-apple-32922
05/29/2026, 2:47 PMcreamy-state-40879
05/29/2026, 9:20 PMgentle-apple-32922
05/29/2026, 10:33 PMcreamy-state-40879
05/31/2026, 9:52 PMelegant-branch-54423
06/01/2026, 1:32 PMopenhands 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.creamy-state-40879
06/01/2026, 7:34 PMelegant-branch-54423
06/01/2026, 7:44 PMgentle-apple-32922
06/01/2026, 9:52 PM