Closed aezarebski closed 2 years ago
Thanks @aezarebski , this is a regression introduced in Networkx 2.6: https://networkx.org/documentation/stable/release/release_2.6.html It should work in Networkx 2.5 but we'll fix the implementation so it works for 2.6 as well.
Hi @aezarebski , this will be fixed in the next release (3.1.0). If you want to fix it yourself, in analysis.py just change
# Next, add edges from linelist
for edge in people.infection_log:
self.graph.add_edge(edge['source'],edge['target'],date=edge['date'],layer=edge['layer'])
to
# Next, add edges from linelist
for edge in people.infection_log:
if edge['source'] is not None: # Skip seed infections
self.graph.add_edge(edge['source'],edge['target'],date=edge['date'],layer=edge['layer'])
Thanks @cliffckerr
Fixed in 3.1
Describe the bug
Requesting the transmission tree from a simulation throws an error
To reproduce
covasim
(I used commit7da3bc46e2344fa8128dfa66c260cadf4213bea2
)requirements.txt
pip install networkx
(because this is needed)Expected behavior
I would have expected the graph object to be constructed.
Screenshots or outputs