[GRASS-dev] [GRASS GIS] #2994: wxGUI start fails with module object has no attribute GRIORA_NearestNeighbour

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-
Keywords: gdal, Python, WMS, rendering, | releasebranch70
  packaging, wxGUI | CPU: x86-64
Platform: Unspecified |
-------------------------------------------------+-------------------------
After starting standalone 7.0.4svn on MS Windows from
[https://wingrass.fsv.cvut.cz/grass71/x86_64/ here], I get a traceback
instead of wxGUI (g.gui). The command line works. GUI gives some error
coming from WMS rendering. Lazy import would be nice here but I guess the
error might be some incompatible Python packages. Here is the traceback:

{{{
...
<module>
     from lmgr.frame import GMFrame
   File "C:\Program Files\GRASS GIS 7.0.4svn\gui\wxpython\lmgr\frame.py",
line 50
, in <module>
     from lmgr.layertree import LayerTree, LMIcons
   File "C:\Program Files\GRASS GIS
7.0.4svn\gui\wxpython\lmgr\layertree.py", lin
e 37, in <module>
     from mapdisp.frame import MapFrame
   File "C:\Program Files\GRASS GIS
7.0.4svn\gui\wxpython\mapdisp\frame.py", line
  33, in <module>
     from core.render import Map
   File "C:\Program Files\GRASS GIS 7.0.4svn\gui\wxpython\core\render.py",
line 4
6, in <module>
     from core.ws import RenderWMSMgr
   File "C:\Program Files\GRASS GIS 7.0.4svn\gui\wxpython\core\ws.py", line
36, i
n <module>
     from osgeo import gdal
   File "C:\Program Files\GRASS GIS 7.0.4svn\Python27\lib\site-
packages\osgeo\gda
l.py", line 94, in <module>
     from gdalconst import *
   File "C:\Program Files\GRASS GIS 7.0.4svn\Python27\lib\site-
packages\osgeo\gda
lconst.py", line 97, in <module>
     GRIORA_NearestNeighbour = _gdalconst.GRIORA_NearestNeighbour
AttributeError: 'module' object has no attribute 'GRIORA_NearestNeighbour'
}}}

{{{
> g.version -re

GRASS 7.0.4svn (2016)
libgis Revision: 67364
libgis Date: 2015-12-24 16:07:44 +0100 (Thu, 24 Dec 2015)
PROJ.4: 4.9.2
GDAL/OGR: 2.0.2
GEOS: 3.5.0
SQLite: 3.7.17
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994&gt;
GRASS GIS <https://grass.osgeo.org>

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: gdal, Python, WMS, rendering,
                         | packaging, wxGUI
       CPU: x86-64 | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by wenzeslaus):

g.gui worked in 7.0.4svn r68280.

{{{
GRASS version: 7.0.4svn
GRASS SVN Revision: 68280
Build Date: 2016-04-20
Build Platform: x86_64-w64-mingw32
GDAL/OGR: 2.0.2
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: gdal, Python, WMS, rendering,
                         | packaging, wxGUI
       CPU: x86-64 | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by martinl):

I cannot reproduce it with

{{{
GRASS version: 7.0.4svn
GRASS SVN Revision: 68280
Build Date: 2016-04-21
Build Platform: x86_64-w64-mingw32
GDAL/OGR: 2.0.2
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1
}}}

The GUI starts, I can display raster, vector maps...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: gdal, Python, WMS, rendering,
                         | packaging, wxGUI
       CPU: x86-64 | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by martinl):

What contains your `C:\Program Files\GRASS GIS 7.0.4svn\Python27\lib\site-
packages\osgeo\gda
lconst.py`?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-releasebranch70
Resolution: invalid | Keywords: gdal, Python, WMS, rendering,
                         | packaging, wxGUI
       CPU: x86-64 | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by wenzeslaus):

* status: new => closed
* resolution: => invalid

Comment:

I can't reproduce it anymore with newly downloaded build from today, Apr
21 (which is still r68280). Closing as invalid. We can reopen if needed.
The following 7.0.4svn 32bit and 64bit worked:

{{{
System Info
GRASS version: 7.0.4svn
GRASS SVN Revision: 68280
Build Date: 2016-04-21
Build Platform: x86_64-w64-mingw32
GDAL/OGR: 2.0.2
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200

> g.version -re
GRASS 7.0.4svn (2016)
libgis Revision: 67364
libgis Date: 2015-12-24 16:07:44 +0100 (Thu, 24 Dec 2015)
PROJ.4: 4.9.2
GDAL/OGR: 2.0.2
GEOS: 3.5.0
SQLite: 3.7.17
}}}

{{{
System Info
GRASS version: 7.0.4svn
GRASS SVN Revision: 68280
Build Date: 2016-04-21
Build Platform: i386-w64-mingw32
GDAL/OGR: 2.0.2
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200

> g.version -re
GRASS 7.0.4svn (2016)
libgis Revision: 67364
libgis Date: 2015-12-24 16:07:44 +0100 (Thu, 24 Dec 2015)
PROJ.4: 4.9.2
GDAL/OGR: 2.0.2
GEOS: 3.5.0
SQLite: 3.7.17
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#2994: wxGUI start fails with module object has no attribute
GRIORA_NearestNeighbour
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-releasebranch70
Resolution: invalid | Keywords: gdal, Python, WMS, rendering,
                         | packaging, wxGUI
       CPU: x86-64 | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by wenzeslaus):

Just for the record:

Replying to [comment:3 martinl]:
> What contains your `...\osgeo\gdalconst.py`?

{{{
GRIORA_NearestNeighbour = _gdalconst.GRIORA_NearestNeighbour
}}}

The import message suggests that the symbol/attribute is missing in the
`_gdalconst` module which is a C module I suppose. Likely this was some
DLL glitch.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2994#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>