danioxoli / HotSpotAnalysis_Plugin

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

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

Closed mlfriedman closed 4 years ago

mlfriedman commented 4 years ago

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:/OSGEO4~1/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:/OSGEO4~1/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'

mlfriedman commented 4 years ago

This was previously addressed in #15 - just needed to open:

"..\apps\Python37\Lib\site-packages\pysal\ init .py"

and comment line 95

import pysal.spreg