Skip to content

NoneType when running with --all (generate_network_info) #80

@sebimoe

Description

@sebimoe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions