docker-autocompose icon indicating copy to clipboard operation
docker-autocompose copied to clipboard

NoneType when running with --all (generate_network_info)

Open sebimoe opened this issue 11 months ago • 0 comments

Great tool. But I ran into an issue here:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose --all
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/src/app/src/autocompose.py", line 132, in main
    host_networks = generate_network_info()
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/app/src/autocompose.py", line 54, in generate_network_info
    for config in network_attributes.get("IPAM", {}).get("Config", [])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Docker version 27.3.1, build ce1223035a

sebimoe avatar Jan 16 '25 03:01 sebimoe