Comments (8)
Found a solution which works:
> def connected_component_subgraphs(G):
for c in nx.connected_components(G):
yield G.subgraph(c)
from chinese-postman.
Seems like it's still present up till 2.3, and removed in 2.4.
Deprecation notice says this is the replacement:
G.subgraph(c) for c in connected_components(G)
Until this is fixed, just stick to networkx 2.3 or earlier.
from chinese-postman.
This has already been fixed in the master branch.
from chinese-postman.
This is also an issue in mordred
for some reason. Any ideas?
module 'networkx' has no attribute 'biconnected_component_subgraphs' (SpAbs_Dt/SpAbs/mordred._matrix_attributes.Eigen(mordred.DetourMatrix.DetourMatrixCache())/mordred.DetourMatrix.DetourMatrixCache())
from chinese-postman.
This is also an issue in
mordred
for some reason. Any ideas?module 'networkx' has no attribute 'biconnected_component_subgraphs' (SpAbs_Dt/SpAbs/mordred._matrix_attributes.Eigen(mordred.DetourMatrix.DetourMatrixCache())/mordred.DetourMatrix.DetourMatrixCache())
It seems that they are working on that, mordred-descriptor/mordred#84. So you can just basically stick to networkx with version 2.3 in your virtual environment,
pip install --force-reinstall networkx==2.3
This will fix your problem of using mordred
.
from chinese-postman.
Found a solution which works:
> def connected_component_subgraphs(G): for c in nx.connected_components(G): yield G.subgraph(c)
Thank you it works
from chinese-postman.
def connected_component_subgraphs(G):
for c in nx.connected_components(G):
yield G.subgraph(c)
This did not work for me; I get the same error as before. Am I supposed to just run it in the Python console first?
from chinese-postman.
Ok even more mind boggling, after shaving the yak for a while here trying to get this to work is that I found that the only networkx on the system is this one:
networkx-1.7-py2.7.egg
This is surely version 1.7 which is < 2.4 and thus should not be a problem, right? I'm about to figure out how to tear the egg apart, manually editing the file as needed, and reassemble it. This is ridiculous.
from chinese-postman.
Related Issues (18)
- failed by: AttributeError: 'generator' object has no attribute 'sort' HOT 3
- Turn-by-Turn? HOT 2
- Error: Could not find any components. Try selecting different features. HOT 2
- Error postman.py HOT 1
- Inaccurate results for trivial problems HOT 4
- AttributeError: 'set' object has no attribute 'items' HOT 2
- cant export from qgis HOT 2
- Incompatible with QGIS 2 HOT 7
- Unable to install plugin in QGIS 3.14.0-Pi HOT 1
- "Chinese Postman Solver" not found in QGIS plugin manager. HOT 5
- Tips for using the Chinese Postman plugin HOT 1
- AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs' HOT 12
- Cannot import gcd from fractions HOT 1
- icon.png HOT 4
- No module named resources HOT 1
- Slightly off topic - CRS? HOT 7
- Windy Chinese Postman HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chinese-postman.