danioxoli / HotSpotAnalysis_Plugin

A QGIS plugin for hotspot analysis
GNU General Public License v3.0
55 stars 12 forks source link

Hotspot analysis fails to launch #36

Open vnleonenko opened 5 years ago

vnleonenko commented 5 years ago

Hello!

I've successfully installed HotspotAnalysis plugin on QGIS 3.8 thanks to all the tips given here, but now I face a problem to launch it while trying the demo example. The error message I see each time I click on the button:

File ".../QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 546, in run layers, layers_shp = self.loadLayerList() TypeError: cannot unpack non-iterable NoneType object

Haven't found anything similar among the older issues, could you help me out please?

danioxoli commented 5 years ago

Hello,

This is in I/O issue that sometimes shows up. Two suggestions:

1) try to restart QGIS, import only the demo Shapefile in the layer list and re-run the plugin.

2) Try with your own data that must be a PROJECTED Shapefile (points or polygons) with at least a numeric attribute field with no missing data. The download procedure of demo data may corrupt the file and that's why it is not properly read by the plugin.

Let me know in case the issue persists.

Thank you

Daniele

vnleonenko commented 5 years ago

Hi Daniele, Many thanks for the fast answer, restarting QGIS did the trick!

edurojasr commented 4 years ago

Hi! @vnleonenko and @danioxoli

If I can dare, I see that you have managed to use the plugin in QGIS 3.8, I can ask you very humbly, if you can do me the favor of describing how you managed to use it, I am supporting an investigation at the University of Costa Rica and we wish we could Use the plugin

Thank you very much for the help

kkawaguc commented 2 years ago

Hey @danioxoli,

I've come up with the same issue but am trying to run hotspot analysis on my own data (no missing data) and have tried to restart QGIS. I'm using 3.22 and pysal 2.0.0

Any suggestions you've got on how to fix this would be greatly appreciated.

danioxoli commented 2 years ago

I believe the error is due to a known bug that can be likely solved in this way:

If you have active raster layers (or not-shapefile layers) in your project, these should be placed below your shapefile in the layers panel. The plugin looks for a shapefile starting from the upper layer in the layers panel and if it does not find it, return the error.

You may try to leave just the shapefile (projected points or polygons with at least one numeric attribute without missing data) in your project.

Let me know if this was useful.

Best, Daniele

kkawaguc commented 2 years ago

Hey Daniele,

Thanks for the swift response! Gave that a try but unfortunately didn't seem to work. Could it be to do with the fact the shapefile has been generated from the openstreetmaps plugin? Alternatively could it be because the numerical field is being brought in from a join field? I think its unlikely to be the case because there is an int attribute field in the original shapefile but just tossing up possibilities.

EDIT: I've now managed to get it working, I'd been working with a geopackage layer file rather than a shapefile by accident, thanks for your help

Kind regards, Koh