Git Product home page Git Product logo

hotspotanalysis_plugin's People

Contributors

danioxoli avatar gabrieleprestifilippo avatar mazucci avatar stanly3690 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hotspotanalysis_plugin's Issues

issue with hotspot analysis

An error has occurred while executing Python code:

TypeError: '>=' not supported between instances of 'Chain' and 'Chain'
Traceback (most recent call last):
File "C:/Users/k krishna rani samal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 531, in
self.dlg.comboBox.currentIndexChanged.connect(lambda: self.load_comboBox())
File "C:/Users/k krishna rani samal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 472, in load_comboBox
#thresh = pysal.min_threshold_dist_from_shapefile(path)
File "C:\OSGEO41\apps\Python37\lib\site-packages\pysal\weights\user.py", line 1085, in min_threshold_dist_from_shapefile
return min_threshold_distance(points, p)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\pysal\weights\util.py", line 1136, in min_threshold_distance
kd = KDTree(data)
File "C:\OSGEO41\apps\Python37\lib\site-packages\pysal\cg\kdtree.py", line 52, in KDTree
return scipy.spatial.KDTree(data, leafsize)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\scipy\spatial\kdtree.py", line 239, in init
self.maxes = np.amax(self.data,axis=0)
File "C:\OSGEO41\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 2505, in amax
initial=initial)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
TypeError: '>=' not supported between instances of 'Chain' and 'Chain'

ValueError: need at least one array to concatenate

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:\PROGRA1\QGIS31.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:\PROGRA1\QGIS31.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:\PROGRA1\QGIS31.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

"Unsupported Operand Type(s) Error" for New Data

I installed this plugin and used it successfully towards the beginning of this year on German NUTS3 level data. After some installation issues, which you helped me with (thank you!), the plugin worked perfectly for the German data I had. I recently received additional data for the NUTS3 level in Italy and Switzerland. I have added two shape files to my project with the functioning German project which have the new data joined with Italian and Swiss NUTS3 files. As far as I can tell, everything I've done to set them up is identical to the German data. However, when I run the hotspot analysis, for Moran (Getis looks slightly different), I receive the same error for both countries (the plugin still works for my German data). The error looks as follows for both countries:


2020-06-01T12:40:15 WARNING Traceback (most recent call last):
File "C:/Users/Tillern/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 629, in run
statistics = Moran_Local(y, w, transformation=type_w, permutations=permutationsValue)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\esda\moran.py", line 820, in init
z = y - y.mean()
File "D:\Program Files\apps\Python37\lib\site-packages\numpy\core_methods.py", line 151, in _mean
ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'


My data for both Switzerland and Italy exists for every NUTS3 region and always takes a value between 0 and 1 (inclusive). I can make heatmaps so I know Qgis has read in the variables as real numbers.

The traceback looks slightly different when I try the Getis analysis (although the Moran's is what I am interested in):


2020-06-01T13:00:43 WARNING Traceback (most recent call last):
File "C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 627, in run
statistics = G_Local(y, w, star=True, transform=type_w, permutations=permutationsValue)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\esda\getisord.py", line 352, in init
self.calc()
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\esda\getisord.py", line 403, in calc
y2 = y * y
TypeError: unsupported operand type(s) for *: 'NoneType' and 'NoneType'


I have uninstalled and reinstalled the plugin as well as Pysal with no change.

I have tried reading up on what can cause this python error, however, the cases in which it occurs is quite varied and I can't identify what could be causing it in my case. Any help would be greatly appreciated!

Please let me know what additional information I can provide to help with diagnosing the issue, I am continuing to look into this on my end as well.

Python error : Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method

I am using a windows machine with QGIS version 3.4. I have downgraded pysal to 1.14.3 and have QGIS thinks it has properly installed the plugin - but it will not load Any thoughts or suggestions?

AttributeError: module 'pysal' has no attribute 'common'
Traceback (most recent call last):
File "C:/OSGEO41/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/matth/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/OSGEO4
1/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/matth/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "C:/OSGEO41/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\pysal_init
.py", line 46, in
pysal.common.pandas = pandas
AttributeError: module 'pysal' has no attribute 'common'

Error message "unpack requires a buffer of 20 bytes" when opening plugin

Hello - I am new to both QGIS and python. I am trying to run the hotspot analysis tool on Mac version 10.11.6, QGIS version 3.2.2. I have successfully installed the hotspot plugin for QGS3, however whenever I open the tool from the vector drop-down menu I receive the following error message:

"An error has occurred while executing Python code:

struct.error: unpack requires a buffer of 20 bytes"

The hotspot analysis window does pop up after this message, and I can select a layer for analysis and provide the relevant details, however nothing happens after selecting "OK." I've attached screenshots of my version of QGIS and the error message.
screen shot 2018-09-12 at 3 20 46 pm
screen shot 2018-09-12 at 3 19 16 pm

classFactory()

Hi Everybody,

I have followed all the instructions to install pysal, numpy and simpy to get install afterwards "Hotspot analysis" plugin in my QGIS 3.4

As you can see from this picture, everything seems to be ok:

image

But when I try to install the plugin in QGIS I get the following error:

Impossibile caricare il plugin 'HotspotAnalysis' a causa di un errore chiamando il metodo classFactory()

ModuleNotFoundError: No module named 'doctest'
Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\pysal_init
.py", line 40, in
import pysal.cg
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\pysal\cg_init
.py", line 4, in
from .shapes import *
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\pysal\cg\shapes.py", line 9, in
import doctest
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'doctest'

Versione Python: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Versione di QGIS: 3.4.1-Madeira Madeira, 383851c597

Percorso Python:
C:/PROGRA1/QGIS31.4/apps/qgis/./python
C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS31.4/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.4\bin\python37.zip
C:\PROGRA1\QGIS31.4\apps\Python37\DLLs
C:\PROGRA1\QGIS31.4\apps\Python37\lib
C:\Program Files\QGIS 3.4\bin
C:\PROGRA1\QGIS31.4\apps\Python37
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\lxml-4.2.5-py3.7-win-amd64.egg
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\win32
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\giugg_000\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\mmqgis/forms
C:/Users/giugg_000/OneDrive - Alma Mater Studiorum Università di Bologna/PREPARAZIONE TESI A TUTTI GLI EFFETTI

Do you know how could I solve this issue?
Thanks,
Best
Giulia

Scheduling the HS analysis

Hello,
I am not quite familiar with Qgis environment, so apologises if this is a simple question. I need the datas in a google sheet periodically analysed by HS plugin, according to their dates, so all records from same date will be analysed as a set, for hotspots. Then, next day, data table will be checked again for existence of newly added set of data.
Is is possible to automate such process in Qgis? I know there are python scripting and scheduling options, but just wanted to be sure this plugin is compatible with such an automation procedure. I am not sure about Qgis can directly read/write Google Sheets but my attention is mostly on the plugin side.
I appreciate any opinions.

Error python on open plug

hi, i install without problem the plug.
But, on open that, python error appears "CHAIN - CHAIN"
thank you!

Windows 10 64 bit, QGIS 3.14 stand alone, clean profile

An error has occurred while executing Python code:

TypeError: '>=' not supported between instances of 'Chain' and 'Chain'
Traceback (most recent call last):
File "C:/Users/UV/AppData/Roaming/QGIS/QGIS3\profiles\pulito/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 551, in run
self.load_comboBox()
File "C:/Users/UV/AppData/Roaming/QGIS/QGIS3\profiles\pulito/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 472, in load_comboBox
thresh = pysal.min_threshold_dist_from_shapefile(path)
File "C:\Users\UV\AppData\Roaming\Python\Python37\site-packages\pysal\weights\user.py", line 1085, in min_threshold_dist_from_shapefile
return min_threshold_distance(points, p)
File "C:\Users\UV\AppData\Roaming\Python\Python37\site-packages\pysal\weights\util.py", line 1136, in min_threshold_distance
kd = KDTree(data)
File "C:\Users\UV\AppData\Roaming\Python\Python37\site-packages\pysal\cg\kdtree.py", line 52, in KDTree
return scipy.spatial.KDTree(data, leafsize)
File "C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\scipy\spatial\kdtree.py", line 248, in init
self.maxes = np.amax(self.data,axis=0)
File "", line 6, in amax
File "C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 2668, in amax
keepdims=keepdims, initial=initial, where=where)
File "C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
TypeError: '>=' not supported between instances of 'Chain' and 'Chain'

ImportError: Something is wrong with the numpy installation QGIS 3.4.5

Hi @danioxoli

I tried to use the plugin, but there is a problem with the installation. Tried in QGIS 3.4.5 (probably it has not been tested in this QGIS release).

I have install the plugin following this instructions:

 $ py3_env
 $ python -m pip install --upgrade pip
 $ python -m pip install -I pysal==1.14.3

The issue have 2 parts, so I'm going to explain both:

Part 1: Cant use the plugin so its give this error

Unable to load 'HotspotAnalysis' plug-in due to an error calling your classFactory () method

ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.
Traceback (most recent call last):

File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python/plugins\HotspotAnalysis_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\pysal_init
.py", line 40, in
import pysal.cg
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\pysal\cg_init
.py", line 4, in
from .shapes import *
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\pysal\cg\shapes.py", line 12, in
from .sphere import arcdist
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\pysal\cg\sphere.py", line 15, in
import numpy
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\numpy_init_.py", line 142, in
from . import core
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\numpy\core_init_.py", line 91, in
raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

Versión de Python: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Versión de QGIS: 3.4.5-Madeira Madeira, 89ee6f6e23

Ruta de Python:
C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python/plugins
C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.4\bin\python37.zip
C:\PROGRA1\QGIS 3.4\apps\Python37\DLLs
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib
C:\Program Files\QGIS 3.4\bin
C:\Users\eduar\AppData\Roaming\Python\Python37\site-packages
C:\PROGRA1\QGIS 3.4\apps\Python37
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS 3.4\apps\Python37\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python

Part 2: The processing toolbox it broke so cant use any processing module, have to reinstall QGIS

Unable to load the 'processing' plug-in

ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.
Traceback (most recent call last):

File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 309, in loadPlugin
import(packageName)
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/PROGRA~1/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing_init
.py", line 29, in
from processing.tools.general import * # NOQA
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 39, in
from processing.core.Processing import Processing
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 58, in
from processing.algs.qgis.QgisAlgorithmProvider import QgisAlgorithmProvider # NOQA
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\algs\qgis\QgisAlgorithmProvider.py", line 81, in
from .HypsometricCurves import HypsometricCurves
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\algs\qgis\HypsometricCurves.py", line 29, in
import numpy
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\numpy_init
.py", line 142, in
from . import core
File "C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\numpy\core_init_.py", line 91, in
raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

Versión de Python: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Versión de QGIS: 3.4.5-Madeira Madeira, 89ee6f6e23

Ruta de Python:
C:/PROGRA1/QGIS 3.4/apps/qgis-ltr/./python
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python/plugins
C:/PROGRA
1/QGIS 3.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.4\bin\python37.zip
C:\PROGRA1\QGIS 3.4\apps\Python37\DLLs
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib
C:\Program Files\QGIS 3.4\bin
C:\Users\eduar\AppData\Roaming\Python\Python37\site-packages
C:\PROGRA1\QGIS 3.4\apps\Python37
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS 3.4\apps\Python37\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/eduar/AppData/Roaming/QGIS/QGIS3\profiles\cursos/python

As you can see the problem seems to be from the installation of numpy an "older version of numpy" I suppose it must be for the installation of PySAL version <= 1.14.3 because when installed with:

$ python -m pip install pysal

which installs the version Pysal 2.0 processing does not break, but the plugin does not work.

I hope this feedback is helpful to use the plugin in the new LTR version of QGIS, I am here to help as much as possible.

Unsucessfully Installation the Plugin

I have been trying unsuccessfully to get this plugin working on a Windows machine running QGIS 3.2.3 that was installed through OSGeo4W. I followed the instructions to upgrade pip and install pysal but I am receiving the following error in the QGIS Python log when I try to initiate the plugin:

Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method

AttributeError: module 'pysal' has no attribute 'core'
Traceback (most recent call last):
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 334, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init
.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/OSGEO4
1/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\pysal_init
.py", line 53, in
open = pysal.core.FileIO.FileIO
AttributeError: module 'pysal' has no attribute 'core'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.12.1-București București, 121cc00ff0

Python Path:
C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\BoundaryDelineation/lib
C:/OSGEO41/apps/qgis/./python
C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4
1/apps/qgis/./python/plugins
C:\OSGEO41\apps\Python37
C:\OSGEO4
1\apps\Python37\Scripts
C:\OSGEO41\bin\python37.zip
C:\OSGEO4
1\apps\Python37\DLLs
C:\OSGEO41\apps\Python37\lib
C:\OSGEO4
1\bin
C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages
C:\OSGEO41\apps\Python37\lib\site-packages
C:\OSGEO4
1\apps\Python37\lib\site-packages\win32
C:\OSGEO41\apps\Python37\lib\site-packages\win32\lib
C:\OSGEO4
1\apps\Python37\lib\site-packages\Pythonwin
C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\Admin\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows
C:/Users/Admin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web
C:\Users\Admin\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
.
Kindly help me Install Hotspot Analysis Plugin
Email id [email protected]
Best Regards,
M.Ganesan

Failed to remove row

When I run Local Getis-Ord Gi* with other settings like when checking "Use Knn standardized spatial weights" I get an error in Distance.py line 112 in "row.remove(i)". The error is caused by "i not in row array".
error.zip

        neighbors = {}
        for i,row in enumerate(to_weight):
            row = row.tolist()
            row.remove(i) #This line (112) gives error 
            row = [ids[j] for j in row]
            focal = ids[i]
            neighbors[focal] = row
        W.__init__(self, neighbors, id_order=ids)

Any suggestions ?

QGIS plugin not loading: no module named pandas

I have tried installing this plugin to QGIS 3.4.4 after installing pysal successfully through the OSGeo4W Shell, but unfortunately I get the following error:
Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/Andrew Whyte/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\__init__.py", line 34, in classFactory from .hotspot_analysis import HotspotAnalysis File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/Andrew Whyte/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in import pysal File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\pysal\__init__.py", line 48, in pysal.common.pandas = None AttributeError: module 'pysal' has no attribute 'common'

If anyone could help me understand why this is happening that would be great.

Document restriction to ESRI Shapefile format

This plugin seems to only support ESRI Shapefiles, not anything in loaded in QGIS with QGIS' abstractions. Please document that prominently, e.g. with a note in the plugin description.

I tested with both a GeoPackage and a GML layer, there were not displayed in the plugin's dropdown layer chooser.

(oups) Where is the menu ?

I use QGIS 3.6.3 under win10. I have followed the advise of Daniele for py command script in OSGeo4W shell as administrator.

But, the installation of the plugins failed :
ModuleNotFoundError: ModuleNotFoundError: No module named 'pysal.esda'
Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/vincent/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 686, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/vincent/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 39, in
from pysal.esda.getisord import *
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 686, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pysal.esda'No module named 'pysal.esda'

Plus, this kind of message:
:/PROGRA1/QGIS31.6/apps/qgis/plugins/grassplugin7.dll (Impossible de charger la bibliothèque C:\PROGRA1\QGIS31.6\apps\qgis\plugins\grassplugin7.dll

Is there a simple way for a non-geomatician to solve this (possible) inconsistency of path ?

Gratefully yours.
vincent

HotSpotAnalysis_Plugin Installation Problems with each steps in 1.0.3

Hotspot Installation Problems with steps 1 to 4 in 1.0.3
Hello Daniele,
Thanks to you and your colleagues for this plugin, and thanks, too, for your time and effort to sort out my installation problem
Windows 10 Home 10.0.17763 Build 17763
QGIS 3.4.5
I followed the steps as set out and numbered in README in HotspotAnalysis 1.0.3
Here are the steps and results:
HA QGIS 1.docx
HA QGIS 3.docx
OSGeo4W 1
OSGeo4W 2

**1) Install dependencies
py3_env
python -m pip install --upgrade pip
python -m pip install pysal
OSGeo4W Shell resulting bottom line was
Successfully installed pysal-2.0.0
Attached File = OSGeo4W 1.png
**2) Open QGIS
Under Plugins I saw “Python Console”
When I tried to install HotspotAnalysis on QGIS the response was:
Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'pysal.esda'
(Text of QGIS error message is HA QGIS 1.docx)
I uninstalled HotspotAnalysis Plugin

**3) latest unreleased version
I downloaded the zip, opened QGIS and carried out install from zip
I got the same result as above for **2)
Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() module
ModuleNotFoundError: No module named 'pysal.esda'

The installation window showed version 1.0.2 was installed
**4) Pysal Common Error on Windows
I went to the github.com…15
I ran OSGeo W Shell

py3_env
pip uninstall pysal
pip install --no-cache-dir pysal

Bottom line was:

Successfully installed pysal-2.0.0

(File attached as OSGeo4W 2.png)

I uninstalled the HA plugin that was loaded in **3

I restarted QGIS and ran the HA installation

Top message was

Couldn’t load plugin Hotspot Analysis due to an error when calling its classFactory() method

Bottom line was:

ModuleNotFoundError: No module named pysal esda

Window shows 1.0.3 as installed version

Error message is HA QGIS 3.docx

At this point Folders present in Python37 were

Pysal-2.0.0-py37.egg-info
Pysal/explore/esda

Many thanks and regards,

Jim

Installing Hotspot Analysis plugin on QGIS 3.10.5 on MacOS

Hi Daniele,

Thank you (and your colleagues, MA Zurbarán, S Shaji, and AK Muthusamy) for your great efforts in developing the Hotspot Analysis plugin, which is a very useful tool for spatial clustering and analysis implemented in QGIS.

At first, I had an issue installing the plugin for QGIS 3.10.5 (all-in-one, long-term release, signed installer) on MacOS 10.15.4 (Catalina). I had the same issue regarding installation, similar to the previous issues submitted by gariochquine and biancaglez, among others. But after looking through the available documentation, I was finally successful in installing the plugin on my machine. I wanted to post this issue here, outlining the steps I made to help other users (who also encounter the same installation issues with these same settings) successfully complete their installation.

I installed the plugin by following the installation instructions for MacOS in the README, particularly installing PySAL 1.14.3, numpy, and, scipy using pip3 via the Terminal, all of which were installed in this directory /Library/Python/3.7/site-packages/. After installing the required dependencies, I proceeded to install the plugin through the QGIS Plugin Manager, which was where I encountered the error as follows:

Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method 

ModuleNotFoundError: No module named 'pysal.esda' 
Traceback (most recent call last):
  File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/dondealban/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/__init__.py", line 34, in classFactory
    from .hotspot_analysis import HotspotAnalysis
  File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/dondealban/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 39, in 
    from pysal.esda.getisord import *
  File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pysal.esda'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] 
QGIS version: 3.10.5-A Coruña A Coruña, 984615fe1e

So I went back to the reported issues regarding the plugin in the past and found the answer in your previous responses, particularly in 14 March 2018 and in 31 Jan 2020. Indeed, the problem was that QGIS could not find PySAL within the Python environment that it was using, which I found out after importing PySAL from the Python console of QGIS.

Hence, I then tried to install PySAL again, but this time into the Python environment used by QGIS. I used the following command via the Terminal:

$ pip3 install -U pysal==1.14.3 -t /Applications/QGIS3.10.app/Contents/Resources/python/

This resulted in the following Terminal log:

Collecting pysal==1.14.3
Collecting numpy>=1.3 (from pysal==1.14.3)
  Using cached https://files.pythonhosted.org/packages/64/1e/982848d4e7b57ed06fbaed251a94d592cc59ebba83e454028f33866d4911/numpy-1.18.4-cp37-cp37m-macosx_10_9_x86_64.whl
Collecting scipy>=0.11 (from pysal==1.14.3)
  Using cached https://files.pythonhosted.org/packages/85/7a/ae480be23b768910a9327c33517ced4623ba88dc035f9ce0206657c353a9/scipy-1.4.1-cp37-cp37m-macosx_10_6_intel.whl
Installing collected packages: numpy, scipy, pysal
Successfully installed numpy-1.18.4 pysal-1.14.3 scipy-1.4.1

Afterwards, I attempted to install the plugin again in QGIS via the Plugin Manager, and finally the Hotspot Analysis plugin worked. Here is the screenshot of the plugin running in QGIS:
qgis hotspot analysis plugin
I hope these steps will be able to help other users in successfully installing the plugin for QGIS on MacOS.

ValueError: Illegal field requested in GetField()

I'm trying to calculate Moran's i with Hotspot Analysis plugin and I get this error:

2018-11-01T16:28:42 WARNING Traceback (most recent call last): File "/Users/MELEIRO/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotSpotAnalysis_Plugin-qgis3/hotspot_analysis.py", line 572, in run u.append(geometry.GetField(C)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/osgeo/ogr.py", line 4749, in GetField raise ValueError("Illegal field requested in GetField()") ValueError: Illegal field requested in GetField()

The selected attribute is a field of type Real that I joint from a text delimited layer.

Error msg running test_data example on Mac

Hi, I am trying to use for the first time your Hot_Spot Analysis Plugin.
I have been following the demo exercise , loading the shape file, so far so good.
Filled the form according to the instructions using the suggested Fixed Distance Band for the example. Input the Output Shape File and press OK.
I am getting the following error message from the Python Log Message Panel

2018-09-30T16:47:46 1 Traceback (most recent call last):
File "/Users/admin/.qgis2/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 604, in run
w = DistanceBand(t, threshold1, p=2, binary=False)
File "/Library/Python/2.7/site-packages/PySAL-1.14.4.post2-py2.7.egg/pysal/weights/Distance.py", line 791, in init
neighbors, weights = self._distance_to_W(ids)
File "/Library/Python/2.7/site-packages/PySAL-1.14.4.post2-py2.7.egg/pysal/weights/Distance.py", line 892, in _distance_to_W
weighted = self.dmat.power(self.alpha)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/base.py", line 440, in getattr
raise AttributeError(attr + " not found")
AttributeError: power not found

Any ideas ?

Thanks
Adrian from Bs.As.

Error message: "TypeError: float() argument must be a string or a number, not 'Chain'"

Hi there,

I've successfully downloaded and installed HotspotAnalysis plugin on my QGIS 3.2.3, but as soon as I launch the plugin I get this python message:

TypeError: float() argument must be a string or a number, not 'Chain'

As I was saying, during the installation process I didn't get any error messages in both OSGeo4W Shell and QGIS... can you help me?
Thanks,

Luca

ModuleNotFoundError: No module named 'Shape'

Hello, I'm trying to install the plugin. I'm using a window machine with QGIS version 3.8. I'm getting the following error :

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/PC-03/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\__init__.py", line 34, in classFactory
    from .hotspot_analysis import HotspotAnalysis
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/PC-03/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in 
    import pysal
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\pysal\__init__.py", line 40, in 
    import pysal.cg
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\pysal\cg\__init__.py", line 4, in 
    from shapes import *
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\shapes\__init__.py", line 1, in 
    from Shape import Shape
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'Shape'

I tried to install the module Shape and it succeed but I have the same error.
numpy and scipy are correctly installed, but I had an error with pysal :

> ERROR: Command errored out with exit status 1:
>    command: 'c:\progra~1\qgis3~1.8\apps\python37\python.exe' 'C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\PC-03\AppData\Local\Temp\tmp4qiwaecr'
>        cwd: C:\Users\PC-03\AppData\Local\Temp\pip-install-10xm4ika\rasterio
>   Complete output (2 lines):
>   INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README.
>   ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
>   ----------------------------------------
> ERROR: Command errored out with exit status 1: 'c:\progra~1\qgis3~1.8\apps\python37\python.exe' 'C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\PC-03\AppData\Local\Temp\tmp4qiwaecr' Check the logs for full command output.

I used "pip install --no-cache-dir pysal" to install pysal.

I read many issues here but I didn't find a solution :(

Any help would be appreciated !

Specific shapefile with EPSG3044 will crash QGIS

Hi Daniele:

Here is a specific issue I found in QGIS with version 3.2 and above.
Dataset: https://goo.gl/AYfXmG
When I use this point dataset to do G_Local test and use Fixed Distance Band, it will crash QGIS.
Not sure if this issue come from pysal module itself.
I tested in both Windows and Linux version, issue applies.
Pysal version: 1.14.3 on Linux, 1.14.4 on Windows.

Cheers,
Ariel

No icon showing on toolbar

Hi- I installed the plugin using the zip folder. Successfully installed the plugin in but icon not showing on the toolbar.

QGIS 3.4.10 Hotspot Analysis Plugin not installing

I'm hoping someone on here might be able to help me. I initially posted at gis.stackexchange.com and someone recommend raising an issue here. I'm fairly new to using QGIS and I'm completely lost. For my PhD project I have to use QGIS to produce georeferenced heatmaps based on informants' hand-drawn maps. An academic from another institution has provided me with step-by-step instructions of what to install and the steps to follow, but I've hit a big problem with installing the Hotspot Analysis plugin in QGIS.

I am working on a Macbook with QGIS 3.4.10. I've tried other installs of QGIS (2.18 and the new 3.8 release) but all presented the same problem. So far I have installed Python, as well as pip, numpy, scify, and pysal (as instructed). However, when I try to install the Hotspot Analysis plugin I keep getting this same error message:

Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'pysal.esda'

Does anyone have any idea how to rectify this? I've tried uninstalling and reinstalling everything. I've also tried installing the plugin from a zip file, but I still get the same message.

ModuleNotFoundError: No module named 'shapes'

Hello, I am trying to install the plugin in ubuntu 18.04 and qgis 3.0. but I am getting the following error:

ModuleNotFoundError: No module named 'shapes' 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 336, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/vagvaf/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/__init__.py", line 34, in classFactory
    from .hotspot_analysis import HotspotAnalysis
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/vagvaf/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 38, in 
    import pysal
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/vagvaf/.local/lib/python3.6/site-packages/pysal/__init__.py", line 40, in 
    import pysal.cg
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/vagvaf/.local/lib/python3.6/site-packages/pysal/cg/__init__.py", line 4, in 
    from shapes import *
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'shapes'

I have all packages installed:

for python 2.7

Requirement already satisfied: pysal in /home/vagvaf/.local/lib/python2.7/site-packages
Requirement already satisfied: numpy>=1.3 in /home/vagvaf/.local/lib/python2.7/site-packages (from pysal)
Requirement already satisfied: scipy>=0.11 in /home/vagvaf/.local/lib/python2.7/site-packages (from pysal)

for python 3.6

Requirement already satisfied: pysal in /home/vagvaf/.local/lib/python3.6/site-packages
Requirement already satisfied: scipy>=0.11 in /home/vagvaf/.local/lib/python3.6/site-packages (from pysal)
Requirement already satisfied: numpy>=1.3 in /home/vagvaf/.local/lib/python3.6/site-packages (from pysal)

Any help would be appreciated!

ModuleNotFoundError: No module named 'pysal.esda

I am running QGIS 3.4.4 in a Windows environment.

I appear to have successfully installed pysal. Running "import pysal" in the QGIS Python console does not generate any errors.

However, when I try to activate the HotSpot Analysis plugin, I get an error message (see below). I did find some discussion of this on StackFlow (Anita's response I think) and tried some of the suggestions there, but no success As there didn't seem to be an issue with 'pysal.esda' in the title, I thought I'd post one. Apologies if there is already a related post that I missed.

Couldn't load plugin 'HotSpotAnalysis_Plugin-qgis3' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'pysal.esda'
Traceback (most recent call last):
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/OSGEO4
1/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3\hotspot_analysis.py", line 39, in
from pysal.esda.getisord import *
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pysal.esda'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.4.4-Madeira Madeira, 73c31df831

Python Path:
C:/OSGEO41/apps/qgis/./python
C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4
1/apps/qgis/./python/plugins
C:\OSGeo4W64\bin\python37.zip
C:\OSGEO41\apps\Python37\DLLs
C:\OSGEO4
1\apps\Python37\lib
C:\OSGeo4W64\bin
C:\OSGEO41\apps\Python37
C:\OSGEO4
1\apps\Python37\lib\site-packages
C:\OSGEO41\apps\Python37\lib\site-packages\win32
C:\OSGEO4
1\apps\Python37\lib\site-packages\win32\lib
C:\OSGEO4~1\apps\Python37\lib\site-packages\Pythonwin
C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\Brian\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
C:/Users/Brian/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_resource_sharing
C:\Users\Brian\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qgis_resource_sharing
C:\Users\Brian\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qgis_resource_sharing\ext_libs

error using demo data

I tried using the demo data provided in this Qgis3 branch.

Although the plugin initiated without any errors, the following warning appeared in the python error log while trying to use the shapefile with points:

image

Would you please advice on this error?

Cheers!

Rafa

Plugin not installing.. OSError: could not find or load spatialindex_c.dll

Hi, I am trying to install the plugin (Windows 10, QGIS via OSGeo4W, pysal version 2.1.0), version qgis3pysal2 version. I am getting the following error. Do you have an idea how I can solve this?

Rgds, Paulo

Couldn't load plugin 'HotSpotAnalysis_Plugin-qgis3pysal2' due to an error when calling its classFactory() method 

OSError: could not find or load spatialindex_c.dll 
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/brp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3pysal2\__init__.py", line 34, in classFactory
    from .hotspot_analysis import HotspotAnalysis
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/brp/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3pysal2\hotspot_analysis.py", line 38, in 
    import pysal
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\__init__.py", line 2, in 
    from . import lib
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\__init__.py", line 28, in 
    from . import io
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\io\__init__.py", line 3, in 
    from .iohandlers import *
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\io\iohandlers\__init__.py", line 4, in 
    from . import gwt
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\io\iohandlers\gwt.py", line 3, in 
    from ...weights.weights import W
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\weights\__init__.py", line 2, in 
    from .distance import *
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\weights\distance.py", line 7, in 
    from .util import isKDTree, get_ids, get_points_array_from_shapefile,\
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\lib\weights\util.py", line 17, in 
    import geopandas as gpd
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\geopandas\__init__.py", line 1, in 
    from geopandas.geoseries import GeoSeries
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\geopandas\geoseries.py", line 12, in 
    from geopandas.base import GeoPandasBase, _series_unary_op, _CoordinateIndexer
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\geopandas\base.py", line 14, in 
    from rtree.core import RTreeError
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\rtree\__init__.py", line 1, in 
    from .index import Rtree
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\rtree\index.py", line 5, in 
    from . import core
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\rtree\core.py", line 116, in 
    raise OSError("could not find or load spatialindex_c.dll")
OSError: could not find or load spatialindex_c.dll

Select the Attribute field!


image

Hi, in the hotspot analysis tool, what should we select for the "select for attribute field"? what kind of attribute needs to be provided?

look forward to your reply

Python Error

Hi,
I installed the plugin following the instructions, but everytime I try to open it on QGIS 3.2.2 I get this error message:

2018-10-12T19:45:41     WARNING    Traceback (most recent call last):
              File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3\hotspot_analysis.py", line 551, in run
              self.load_comboBox()
              File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3\hotspot_analysis.py", line 472, in load_comboBox
              thresh = pysal.min_threshold_dist_from_shapefile(path)
              File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\pysal\weights\user.py", line 1085, in min_threshold_dist_from_shapefile
              return min_threshold_distance(points, p)
              File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\pysal\weights\util.py", line 1142, in min_threshold_distance
              kd = KDTree(data)
              File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\pysal\cg\kdtree.py", line 54, in KDTree
              return scipy.spatial.cKDTree(data, leafsize)
              File "scipy\spatial\ckdtree.pyx", line 531, in scipy.spatial.ckdtree.cKDTree.__init__ (scipy\spatial\ckdtree.cxx:5496)
              File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\numpy\core\numeric.py", line 620, in ascontiguousarray
              return array(a, dtype, copy=False, order='C', ndmin=1)
             TypeError: float() argument must be a string or a number, not 'Chain'

Any idea on what could be the problem?

Thank you

Claudia

TOO MANY VALUES TO UNPACK

Hi Daniele,

the new problem concerns the form of my point vector, in which I have the following fields:

reg_code String 254 0
latitude Real 23 15
longitude Real 23 15
_freq Integer64 10 0

Here in the picture:
image

I am not able to perform hotspot analysis on this layer as it returns me the following error:
2018-11-15T11:35:19 WARNING Traceback (most recent call last):
File "C:/Users/giugg_000/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 564, in run (path, layer_id) = layerName.split('|') ValueError: too many values to unpack (expected 2)

Do you how could I solve this problem?

Best,
Giulia

hotspot analysis in qgis 3.2: TypeError: 'NoneType' object is not iterable

Hello,
I have troubles with hospot analysis install in qgis 3.2.2. I have install pysal with the python consol (import pysal) and install hospot analysis with the experimental plugin. It seems installed, but when I click on hotspot analysis, I have the following message:

Une erreur est survenue lors de l'éxécution du code Python:

TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/agon/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 546, in run
layers, layers_shp = self.loadLayerList()
TypeError: 'NoneType' object is not iterable

Version de Python : 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]
Version de QGIS : 3.2.2-Bonn Bonn, 2684216

Is there an easy fix?

Sylvaine

EOL while scanning string literal

I appear to be receiving the same error in the same place as Davide does in his comment in the "Issue with HotSpot Analysis Plugin - no module named shapes".

However, I am unable to implement the workaround suggested, which was to comment out line 95 from this file: "C:\Program Files\QGIS 3.4\apps\Python37\Lib\site-packages\pysal\ init.py"
Because my "site-packages" folder has no "pysal" folder in it, which I assume is an issue. However, I have followed the installation instructions multiple times (attempting with and without "--no-cache-dir") and OSGeo4W says pysal was successfully installed.

My coding experience is limited to conducting statistical analysis. So what's going on here, along with what needs to be done in the OSGeo4W shell, is beyond my comprehension. Since it says it's an end of line error I'm hoping that it's an easy fix, I just don't really know how to go about fixing it so any help is very appreciated!

The error appears as follows when I install the plugin within Qgis: (interestingly if I reinstall it the error doesn't pop up, but there also is no button for the plugin in my plugin taskbar, if I uninstall it and then install it again the same error occurs)

Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method

SyntaxError: EOL while scanning string literal
Traceback (most recent call last):
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 334, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init
.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal_init
.py", line 95, in
import pysal.spreg
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\spreg_init
.py", line 1, in
from .ols import *
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\spreg\ols.py", line 7, in
from . import user_output as USER
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\spreg\user_output.py", line 9, in
from . import diagnostics
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\spreg\diagnostics.py", line 12, in
from .utils import spmultiply, sphstack, spmin, spmax
File "D:/Program Files/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\clark\AppData\Roaming\Python\Python37\site-packages\pysal\spreg\utils.py", line 10
author = "Luc Anselin [email protected],
^
SyntaxError: EOL while scanning string literal

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.10.2-A Coruña A Coruña, d4cd3cfe5a

Python Path:
C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ClusterPoints
D:/Program Files/apps/qgis/./python
C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
D:/Program Files/apps/qgis/./python/plugins
D:\Program Files\apps\Python37
D:\Program Files\apps\Python37\Scripts
D:\Program Files\bin\python37.zip
D:\Program Files\apps\Python37\DLLs
D:\Program Files\apps\Python37\lib
D:\Program Files\bin
C:\Users\clark\AppData\Roaming\Python\Python37\site-packages
D:\Program Files\apps\Python37\lib\site-packages
D:\Program Files\apps\Python37\lib\site-packages\win32
D:\Program Files\apps\Python37\lib\site-packages\win32\lib
D:\Program Files\apps\Python37\lib\site-packages\Pythonwin
C:/Users/clark/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/clark/Qgis_Stuff/Spatial Testing

Point G_Local with Fixed Distance Band parameter

Hello Daniele,

I have a specific question regarding to Local Getis-Ord Gi test.
I used my point based shapefile as input data, applied G_Local test and given fixed distance band:
e.g: 5000 meter.
And the result gave me several -inf (Z-score) and 0 (p-value).
It would produce normal result perform the same analysis with ArcMap.
So I was wondering was this is a bug in pysal or it is something to do with data value input itself?
My test dataset can be found here: (please simply download the ZIP file)
https://goo.gl/Vbb4m5
I used SUMME as input field, no optimized distance band was selected.
Please let me know if this is something worth looking into, thanks.

Ariel

result show contradict hotspot analysis from Arcmap

Hi,
I newly tryout hotspot analysis from this qgis plugin and I also run the same dataset in Arcmap.
But they show different mapping result.
Getis-Ord Gi value also different for each polygon. with FIX-DISTANCE-BAND
You may find dataset here:
https://goo.gl/GFPJp4
Here I use the field: (SUMME) to analysis hot and cold spot.
Not sure if this error come from negitive value from the data.

You can also see the screenshot of comparison result from ArcMap and QGIS:
https://goo.gl/NtmweZ

It seems to me that the result were contradict, that some area in Arcmap shows hotspot (red) but from QGIS plugin it shows coldspot (blue).

Please see if you also have the same result and if this can be fixed?
Thanks.

Best Regards,
Ariel

QGIS 3.2.1

I previously requested help with problems loading the plugin after upgrading to QGIS 3.2.1, but have since confirmed the problem was due to faulty installation of Pysal. Again, thank you for making this plugin available.

error installing plugin in qgis 3.8

Hi Im having this issue.
When Im installing the plugin this message appears ModuleNotFoundError: No module named 'pysal'
I followed the instructions during the instalation, and still not working. Also I tryed unisntalling like some comments before, but stills not working this message appears:
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."

Hotspot analysis fails to launch

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?

No Module Named 'Doctest'

The installation of the HSA-plugin in QGIS 3.4 failed. The message is: No module named 'doctest'.

Traceback (most recent call last):
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/Martin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis_init_.py", line 34, in classFactory
from .hotspot_analysis import HotspotAnalysis
File "C:/OSGEO4
1/apps/qgis/./python\qgis\utils.py", line 672, in import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Martin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in
import pysal
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\pysal_init
.py", line 40, in
import pysal.cg
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\pysal\cg_init
.py", line 4, in
from .shapes import *
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4
1\apps\Python37\lib\site-packages\pysal\cg\shapes.py", line 9, in
import doctest
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'doctest'.

OS: Windows 10

Is there any idea how to solve the problem? In QGIS 2.18.25 it works.

Thank very much for your help.

Regards

Martin

issue installing plugin

When I try to install the HotSpotAnalysis Plugin I get the error: "ModuleNotFoundError: No module named 'Shape'" I have redownloaded pysal and the shapes module several times to confirm that they are in the correct locations. Any suggestions on how to troubleshoot this error?

QGIS 2 for Mac from Homebrew does not recognise the layers.

Hi, I am getting this error in MacOS QGIS from Homebrew. Can someone help?

An error has occurred while executing Python code:
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/Users/dheerajchand/.qgis2/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 539, in run
layers, layers_shp = self.loadLayerList()
TypeError: 'NoneType' object is not iterable
Python version: 2.7.14 (default, Mar 9 2018, 23:57:12) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
QGIS version: 2.18.18 Las Palmas, exported
Python Path:
/usr/local/Cellar/qgis2/2.18.18/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing
/usr/local/Cellar/qgis2/2.18.18/QGIS.app/Contents/MacOS/../Resources/python
/Users/dheerajchand/.qgis2/python
/Users/dheerajchand/.qgis2/python/plugins
/usr/local/Cellar/qgis2/2.18.18/QGIS.app/Contents/MacOS/../Resources/python/plugins
/usr/local/opt/gdal2-python/lib/python2.7/site-packages
/usr/local/lib/qt-4/python2.7/site-packages
/usr/local/opt/qgis2/libexec/python2.7/site-packages
/usr/local/lib/python2.7/site-packages
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/geos
/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa
/Users/dheerajchand/.qgis2//python
/Users/dheerajchand/.qgis2/python/plugins/mmqgis/forms

Issue with HotSpot Analysis Plugin - no module named shapes

I have been trying unsuccessfully to get this plugin working on a Windows machine running QGIS 3.2.3 that was installed through OSGeo4W. I followed the instructions to upgrade pip and install pysal but I am receiving the following error in the QGIS Python log when I try to initiate the plugin:

Traceback (most recent call last):
File "C:\OSGEO41\apps\Python36\lib\code.py", line 91, in runcode
exec(code, self.locals)
File "", line 1, in
File "C:/OSGEO4
1/apps/qgis/./python\qgis\utils.py", line 674, in import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4~1\apps\Python36\lib\site-packages\pysal_init
.py", line 40, in
import pysal.cg
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 674, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO4
1\apps\Python36\lib\site-packages\pysal\cg_init
.py", line 4, in
from shapes import *
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 674, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'shapes'

The same error happens when I run the command Install Pysal in the console.

Any help would be most appreciated! (PS I am a newbie with anything technical in Python)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.