chinese-postman
chinese-postman copied to clipboard
"Chinese Postman Solver" not found in QGIS plugin manager.
The instructions say:
Download the "Chinese Postman Solver", using the QGIS plugin manager.
However, I do not see anything by this name in the QGIS plugin manager.
It should display if you enable "experimental plugins":
Thanks, that allowed me to install the plug-in, but I still don't see it from the plug-ins menu.
Do I have to have anything selected for it to show up? The instructions say 'Select the features that you want to use. The "Select Features by Polygon" tool works great if you only want to use a small part of a large network.' but when I select the OpenStreetMap layer (I want to select certain street segments and find the minimal path to walk all of them) all the select options are grayed out.
Ah, it may be beacuse there is an error initializing the module, I didn't see this until I restarted:
Couldn't load plugin 'chinesepostman' due to an error when calling its classFactory() method
ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.9/fractions.py)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/__init__.py", line 34, in classFactory
from .chinesepostman import ChinesePostman
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/chinesepostman.py", line 27, in
from . import postman
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/postman.py", line 18, in
import networkx as nx
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "", line 259, in load_module
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/lib/networkx-1.7-py2.7.egg/networkx/__init__.py", line 76, in
import networkx.algorithms
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "", line 259, in load_module
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/lib/networkx-1.7-py2.7.egg/networkx/algorithms/__init__.py", line 11, in
from networkx.algorithms.dag import *
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "", line 259, in load_module
File "/home/michael/.local/share/QGIS/QGIS3/profiles/default/python/plugins/chinesepostman/lib/networkx-1.7-py2.7.egg/networkx/algorithms/dag.py", line 2, in
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.9/fractions.py)
I was able to install the plug-in from QGIS 3.26.2 under Windows.
Hi @michael-ts, how did you solve the gcd import error? I'm running into the same issue here (Ubuntu 22.10).