-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi Daniele,
Thanks for developing & maintaining this very useful plugin.
Installed it successfully on QGIS 3.22 - Ubuntu 20.04.
However, the error below occurs when I launch the tool (v 2.0.0 from https://plugins.qgis.org/plugins/HotspotAnalysis).
TypeError: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "/home/domi/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 547, in run
layers, layers_shp = self.loadLayerList()
TypeError: cannot unpack non-iterable NoneType object
When having some look at the code, the error seems normal.
The reason is that the line 524 under the function "def loadLayerList() <--> hotspot_analysis.py" return NoneType object.
So returning a tuple of 2 empty lists (line 524) maybe an option.
When adopting this simple solution among others, it may also be a good idea to add a condition under the function "def run()" before the line 548 "if len(layers) == 0".
For example:
"if len(layers_shp) == 0:" => display a message indicating that no ShapeFile layer was found in the layer panel.
That's only some idea but I'm sure you'll find better solution.
Note:
To reproduce it, remove any ShapeFile layer from the layer panel; then launch the tool.
Best,
Ludo