danioxoli / HotSpotAnalysis_Plugin

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

No Module Named 'Doctest' #16

Closed mabi38 closed 5 years ago

mabi38 commented 5 years ago

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

danioxoli commented 5 years ago

Dear Martin,

This might be due to a failure of the PySAL installation on QGIS3 (Windows).

Please, look at: https://github.com/danioxoli/HotSpotAnalysis_Plugin/issues/15

Try to repeat the suggested install described in the above and let me know if this will solve the problem too.

Best,

Daniele

mabi38 commented 5 years ago

Hello Daniele,

I tried this workaround. But it did not work.

Martin

danioxoli commented 5 years ago

Dear Martin,

I went a bit through your error. The doctest should be normally a standard Lib of any Python distribution. However, I've not tested QGIS 3.4 yet that (from what I can see on your report) uses Python 3.7.

Therefore, I think it's a bug due to the dev version of QGIS you are using or due to some bad compiling the software into your OS.

At this point, I can just suggest getting back on QGIS 3.2 on which this issue should not appear.

Daniele

mabi38 commented 5 years ago

Hello Daniele, thanks a lot for your reply. That is exactly what I found out. So I will see if with the next versions of QGIS 3.x the problem is solved. Until then I will use the HSA plugin in QGIS 2.18 where it is work working. QGIS 3.2 is not installed anymore on my computer.

Regards

Martin

danioxoli commented 5 years ago

It looks like the problem is solved with the current version of installer of QGIS 3.4 on Windows. I’ll close this. Best, Daniele