Skip to content

Latest docker images fail to run blackd with an ImportError #4163

@ravishi

Description

@ravishi

Describe the bug

I'm on MacOS. I try to run Black through Docker, but the container promptly stops with an ImportError related to the missing aiohttp dep.

To Reproduce

docker run -d -p 45484:45484 --pull always pyfound/black blackd --bind-host 0.0.0.0
# returns c42cfd39d8047d840beb779ea529005ef4d5682b060bcbca9b154e940bd346ab
docker logs -f c42cfd39d8047d840beb779ea529005ef4d5682b060bcbca9b154e940bd346ab
Traceback (most recent call last):
  File "/opt/venv/bin/blackd", line 5, in <module>
    from blackd import patched_main
  File "/opt/venv/lib/python3.12/site-packages/blackd/__init__.py", line 14, in <module>
    raise ImportError(
ImportError: aiohttp dependency is not installed: No module named 'aiohttp'. Please re-install black with the '[d]' extra install to obtain aiohttp_cors: `pip install black[d]`
  • Black's version: Any tag greater than pyfound/black:23.10.0
  • OS and Python version: [MacOS/14.2.1 (23C71)]

Metadata

Metadata

Assignees

Labels

T: bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions