danioxoli / HotSpotAnalysis_Plugin

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

ValueError: need at least one array to concatenate #31

Closed AuSpotter closed 4 years ago

AuSpotter commented 5 years ago

Whenever I open the plugin, I get the following error:

An error has occurred while executing Python code:

ValueError: need at least one array to concatenate Traceback (most recent call last): File "C:/Users/XXXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 555, in run self.load_comboBox() File "C:/Users/XXXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 476, in load_comboBox thresh = user.min_threshold_dist_from_shapefile(path) File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\pysal\lib\weights\user.py", line 86, in min_threshold_dist_from_shapefile points = get_points_array_from_shapefile(shapefile) File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\pysal\lib\weights\util.py", line 1075, in get_points_array_from_shapefile data = get_points_array(f) File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\pysal\lib\weights\util.py", line 1026, in get_points_array data = np.vstack([np.array(shape.centroid) for shape in iterable]) File "C:\Users\XXXX\AppData\Roaming\Python\Python37\site-packages\numpy\core\shape_base.py", line 283, in vstack return _nx.concatenate([atleast_2d(_m) for _m in tup], 0) ValueError: need at least one array to concatenate

danioxoli commented 5 years ago

Could you please provide more info about your input data? It seems an issue due to the format of your point layer. I remind you that you need to use a projected Shapefile.

Daniele

belisards commented 3 years ago

Hi, thanks for the plugin! I got the same error. I am using a shapefile, but this error appears even before I select the input layer

danioxoli commented 3 years ago

Try to have a look at the second part of this answer: https://github.com/danioxoli/HotSpotAnalysis_Plugin/issues/54#issuecomment-674772240

Best