Couldn't load plugin 'tuflow' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'winreg'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 334, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow/__init__.py", line 71, in classFactory
from .tuflowqgis_menu import tuflowqgis_menu
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 737, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow/tuflowqgis_menu.py", line 38, in
from tuflow.ReFH2.refh2 import Refh2Dock
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 737, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow/ReFH2/refh2.py", line 3, in
import winreg
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 737, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'winreg'
Python version: 3.7.5rc1 (default, Oct 8 2019, 16:47:45) [GCC 9.2.1 20191008]
QGIS version: 3.10.0-A Coruña A Coruña, 6c816b4204
Python Path:
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LAStools
/usr/share/qgis/python
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/usr/local/lib/python3.7/dist-packages
/usr/lib/python3/dist-packages
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/DigitizingTools/tools
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/DigitizingTools
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/crayfish/gui/../pyqtgraph-0.10.0-py2.py3-none-any.whl
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgis_resource_sharing
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgis_resource_sharing/ext_libs
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SwapVectorDirection
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow/forms
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow
/home/pavel/.local/share/QGIS/QGIS3/profiles/default/python/plugins/tuflow/tuflowqgis_tuviewer
Hi, thanks for the detailed post. This was indeed being caused by the refh2 tool which is a new feature. A check has been added that only loads the tool when using Windows.
Plugin does not work on Linux
Error:
System info:
Can be fixed by commenting out the ReFH2 lines: