Bug report #16777

GRASS plugin/Processing tools not loading QGIS 2.18.10 installer (both standalone and osgeo4w)

Added by James Burn almost 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Build/Install
Affected QGIS version:2.18.10 Regression?:Yes
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24676

Description

Note - the affected version below states "master" as I was unable to select a 2.18.10 - the affected version is 2.18.10
When launching the QGIS Desktop with Grass, all Grass functions fail to load - tool bar, plugin reference and panel. Related Grass processing algorithms then also fail (the appear in the processing toolbox, but error when loading). The log file says that it is unable to find the grass dll, however on checking the path provided by the log file, I have confirmed that it is there. In the plugin manager, Grass no longer appears as an option either.
Rolling back to 2.18.9 - everything works again. I attempted to re-install 2.18.10 and Grass failed again.

osgeo_grass.png (32.4 KB) Axel Hörteborn, 2017-07-23 01:20 AM

osgeo_grass2.png (107 KB) Axel Hörteborn, 2017-07-23 12:51 PM

grass3.PNG (27.7 KB) Axel Hörteborn, 2017-07-24 07:12 PM

History

#1 Updated by Andre Joost almost 7 years ago

Seems to be related to the standalone installer only, while the OSGEO4W 64 bit installed version works for me. See also https://gis.stackexchange.com/questions/246022/unable-to-run-any-grass-7-algorithms-in-qgis-2-18-10-on-windows-764

Once you set the GRASS7 path to OSGEO4W64, standalone QGIS works for me too.

Furthermore, the GRASS 7.2.1 GUI icon only works from OSGEO4W, while the icon from standalone causes a crash after selecting location and mapset. This is the error log from GRASS GUI:

Cleaning up temporary files...
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.2.1
GRASS GIS homepage:                      http://grass.osgeo.org
This version running through:            Command Shell (C:\Windows\system32\cmd.
exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

Launching <wxpython> GUI in the background, please wait...
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\wxgui.py", li
ne 158, in <module>
    sys.exit(main())
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\wxgui.py", li
ne 145, in main
    app = GMApp(workspaceFile)
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\wxgui.py", li
ne 48, in __init__
    wx.App.__init__(self, False)
  File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicod
e\wx\_core.py", line 7981, in __init__
    self._BootstrapApp()
  File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicod
e\wx\_core.py", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\wxgui.py", li
ne 90, in OnInit
    from lmgr.frame import GMFrame
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\lmgr\frame.py
", line 50, in <module>
    from lmgr.layertree import LayerTree, LMIcons
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\lmgr\layertre
e.py", line 38, in <module>
    from mapdisp.frame import MapFrame
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\mapdisp\frame
.py", line 34, in <module>
    from mapdisp.toolbars import MapToolbar, NvizIcons
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\mapdisp\toolb
ars.py", line 22, in <module>
    from nviz.main import haveNviz
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\nviz\main.py" 
, line 24, in <module>
    from nviz import mapwindow
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\nviz\mapwindo
w.py", line 42, in <module>
    from nviz.workspace import NvizSettings
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\nviz\workspac
e.py", line 23, in <module>
    from nviz import wxnviz
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\gui\wxpython\nviz\wxnviz.p
y", line 46, in <module>
    from grass.lib.vector import *
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\etc\python\grass\lib\vecto
r.py", line 23, in <module>
    _libs["grass_vector.7.2.1"] = load_library("grass_vector.7.2.1")
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\etc\python\grass\lib\ctype
s_loader.py", line 62, in load_library
    return self.load(path)
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\etc\python\grass\lib\ctype
s_loader.py", line 240, in load
    return _WindowsLibrary(path)
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\etc\python\grass\lib\ctype
s_loader.py", line 223, in __init__
    self.cdll = ctypes.cdll.LoadLibrary(path)
  File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\ctypes\__init__.py", line 443,
in LoadLibrary
    return self._dlltype(name)
  File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\ctypes\__init__.py", line 365,
in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] Das angegebene Modul wurde nicht gefunden

#2 Updated by Giovanni Manghi almost 7 years ago

  • Affected QGIS version changed from master to 2.18.10
  • Regression? changed from No to Yes

#3 Updated by Giovanni Manghi almost 7 years ago

  • Subject changed from Grass plugin / processing tools not loading to GRASS plugin/Processing tools not loading in standalone QGIS 2.18.10 installer
  • Category changed from GRASS to Build/Install

#4 Updated by Andre Joost almost 7 years ago

Although I used the Icon "QGIS Desktop 2.18.10 with GRASS 7.2.1", I have no Grass plugin available. Form the startup log:

2017-07-03T11:12:42    1    Konnte C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassplugin7.dll nicht laden (Grund: Die Bibliothek C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassplugin7.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gefunden.)
2017-07-03T11:12:42    1    Konnte C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassprovider7.dll nicht laden (Grund: Die Bibliothek C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassprovider7.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gefunden.)
2017-07-03T11:12:42    1    Konnte C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassrasterprovider7.dll nicht laden (Grund: Die Bibliothek C:/PROGRA~1/QGIS2~1.18/apps/qgis/plugins/grassrasterprovider7.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gefunden.)

The missing dll files however are in the folder /apps/qgis/plugins.

So it is not only processing that fails.

No errors and GRASS plugin available in the C:\Osgeo4W64 installation.

#5 Updated by Axel Hörteborn almost 7 years ago

I'm experiencing the same problem. I do not use the grass-toolbar, hence I use processing.runalg("grass:v.voronoi", parameters). On startup I also gets:

2017-07-06T06:37:12 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll: The specified module could not be found.)
2017-07-06T06:37:12 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll: The specified module could not be found.)
2017-07-06T06:37:12 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll: The specified module could not be found.)

The .dlls are in the specified folder :(

#6 Updated by Axel Hörteborn almost 7 years ago

Not only in standalone version, also in the osgeo4w installation.

#7 Updated by Giovanni Manghi almost 7 years ago

  • Subject changed from GRASS plugin/Processing tools not loading in standalone QGIS 2.18.10 installer to GRASS plugin/Processing tools not loading QGIS 2.18.10 installer (both standalone and osgeo4w)

Axel Andersson wrote:

Not only in standalone version, also in the osgeo4w installation.

confirmed here.

#8 Updated by Giovanni Manghi almost 7 years ago

Confirmed also GRASS no working in Processing:

This algorithm cannot be run :-(
It seems that GRASS GIS 7 is not correctly installed and configured in your system. Please install it before running GRASS GIS 7 algorithms.

#9 Updated by Jürgen Fischer almost 7 years ago

Maybe a issue in GRASS in OSGeo4W. Apparently it's linked against a old version of GDAL. See https://lists.osgeo.org/pipermail/grass-user/2017-July/076735.html

#10 Updated by Giovanni Manghi almost 7 years ago

Jürgen Fischer wrote:

Maybe a issue in GRASS in OSGeo4W. Apparently it's linked against a old version of GDAL. See https://lists.osgeo.org/pipermail/grass-user/2017-July/076735.html

Hi Jurgen,
installing gdal201dll in osgeo4w helps indeed and makes GRASS work again.

Is this really an upstream (GRASS) issue or the ball in our side?

#11 Updated by Jürgen Fischer almost 7 years ago

Giovanni Manghi wrote:

installing gdal201dll in osgeo4w helps indeed and makes GRASS work again.

Is this really an upstream (GRASS) issue or the ball in our side?

OSGeo4W not GRASS.

But it of course depends on your angle. OSGeo4W packaging of GRASS is done by Martin Landa of GRASS and QGIS in OSGeo4W is packaged by me. So the people to blame are the same - you just have to catch them with the right hat on ;)

Anyway, I added a dependency to the grass package in osgeo4w - so the missing dll should be installed automatically now.

#12 Updated by Giovanni Manghi almost 7 years ago

Is this really an upstream (GRASS) issue or the ball in our side?

OSGeo4W not GRASS.

yes sorry I meant that.

Anyway, I added a dependency to the grass package in osgeo4w - so the missing dll should be installed automatically now.

so I guess that if the next 2.18 point release will contain the same dependency we can close this, right?

#13 Updated by Jürgen Fischer almost 7 years ago

Giovanni Manghi wrote:

Anyway, I added a dependency to the grass package in osgeo4w - so the missing dll should be installed automatically now.

so I guess that if the next 2.18 point release will contain the same dependency we can close this, right?

Yes.

#14 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

#15 Updated by Andre Joost almost 7 years ago

OSGEO4W worked for me, because gdal201.dll was still present from an earlier install.

Anyway, to get QGIS 2.18.10 standalone running too, you can copy C:\OSGeo4W64\bin\gdal201.dll to C:\Program Files\QGIS 2.18\bin

#16 Updated by Jürgen Fischer almost 7 years ago

Andre Joost wrote:

OSGEO4W worked for me, because gdal201.dll was still present from an earlier install.

Anyway, to get QGIS 2.18.10 standalone running too, you can copy C:\OSGeo4W64\bin\gdal201.dll to C:\Program Files\QGIS 2.18\bin

or extract gdal201dll-2.1.3-2.tar.bz2 (32bit) or (64bit) to C:\Program Files\QGIS 2.18\ (or run setup.bat from C:\Program Files\QGIS 2.18\bin to install the package).

#17 Updated by Axel Hörteborn over 6 years ago

Jürgen Fischer wrote:

Giovanni Manghi wrote:

Anyway, I added a dependency to the grass package in osgeo4w - so the missing dll should be installed automatically now.

so I guess that if the next 2.18 point release will contain the same dependency we can close this, right?

Yes.

I deleted and installed the new 2.18.11 version and it still fails to load the 3 existing plugins. I tried to add the gdal201.dll to C:\OSGeo4W64\bin\ but it didn't help.

#18 Updated by Giovanni Manghi over 6 years ago

I deleted and installed the new 2.18.11 version and it still fails to load the 3 existing plugins. I tried to add the gdal201.dll to C:\OSGeo4W64\bin\ but it didn't help.

did you installed the qgis-grass7-plugin package?

#19 Updated by Axel Hörteborn over 6 years ago

Giovanni Manghi wrote:

did you installed the qgis-grass7-plugin package?

Yes, I've installed following grass packages..

#20 Updated by Axel Hörteborn over 6 years ago

So frustrating, I have no clue what to change :) I changed the folder name to osgeo4w (from osgeo4w64) but still the same error..

#21 Updated by Giovanni Manghi over 6 years ago

Axel Andersson wrote:

I changed the folder name to osgeo4w (from osgeo4w64)

I would not have done that. Anyway, with the osgeo4w installer is safe to remove the c:\osgeo4w folder (or osgeo4w64 depending on your installation) and then relaunch the installer and install what you need. If the packages are already downloaded locally it would not download anything again, so it is a fast procedure.
I would also clean qgis/osgeo entries in your Windows registry with regedit.exe

#22 Updated by Axel Hörteborn over 6 years ago

Giovanni Manghi wrote:

I would not have done that. Anyway, with the osgeo4w installer is safe to remove the c:\osgeo4w folder (or osgeo4w64 depending on your installation) and then relaunch the installer and install what you need. If the packages are already downloaded locally it would not download anything again, so it is a fast procedure.
I would also clean qgis/osgeo entries in your Windows registry with regedit.exe

I removed the catalog again, removed all occurrences of qgis in regedit and the temporary downloads (in AppData/local) and installed a fresh version of osegeo4w(64) with both grass version 6 and 7, when I started QGIS I got following errors in the plugin:

2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassplugin6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassplugin6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassprovider6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassprovider6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll: The specified module could not be found.)

I have the feeling that I'm lacking some lib or why can't it find the existing dlls?

#23 Updated by Giovanni Manghi over 6 years ago

Axel Andersson wrote:

Giovanni Manghi wrote:

I would not have done that. Anyway, with the osgeo4w installer is safe to remove the c:\osgeo4w folder (or osgeo4w64 depending on your installation) and then relaunch the installer and install what you need. If the packages are already downloaded locally it would not download anything again, so it is a fast procedure.
I would also clean qgis/osgeo entries in your Windows registry with regedit.exe

I removed the catalog again, removed all occurrences of qgis in regedit and the temporary downloads (in AppData/local) and installed a fresh version of osegeo4w(64) with both grass version 6 and 7, when I started QGIS I got following errors in the plugin:

2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassplugin6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassplugin6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassplugin7.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassprovider6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassprovider6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassprovider7.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider6.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider6.dll: The specified module could not be found.)
2017-07-24T12:43:54 1 Failed to load C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll (Reason: Cannot load library C:/OSGEO4~1/apps/qgis/plugins/grassrasterprovider7.dll: The specified module could not be found.)

I have the feeling that I'm lacking some lib or why can't it find the existing dlls?

were those files installed? are they in disk?

#24 Updated by Axel Hörteborn over 6 years ago

Giovanni Manghi wrote:

were those files installed? are they in disk?

They are all there..

#25 Updated by Giovanni Manghi over 6 years ago

They are all there..

installation in a clean Windows7 machine, just done it:

https://www.dropbox.com/s/yidblr3nz10jbti/osgeo4w_install.mp4?dl=0

Also available in: Atom PDF