Skip to content

Failed to run gateway = net.attrs["IPAM"]["Config"][0]["Subnet"] TypeError: 'NoneType' object is not subscriptable #35

@di-hieu

Description

@di-hieu

I got error when try run this
Same as when use the docker image docker run --rm -v /var/run/docker.sock:/var/run/docker.sock leoverto/docker-network-graph

sudo python3 -m pipenv --python=/usr/bin/python3 run python docker-net-graph.py -o output.svg
Traceback (most recent call last):
  File "/home/era/docker-network-graph/docker-net-graph.py", line 211, in <module>
    generate_graph(args.verbose, args.out)
  File "/home/era/docker-network-graph/docker-net-graph.py", line 173, in generate_graph
    networks = get_networks(docker_client, verbose)
  File "/home/era/docker-network-graph/docker-net-graph.py", line 66, in get_networks
    gateway = net.attrs["IPAM"]["Config"][0]["Subnet"]
TypeError: 'NoneType' object is not subscriptable

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