[GRASS-dev] [GRASS GIS] #3899: g.gui.gmodeler: loading of modeller file broken with TypeError

#3899: g.gui.gmodeler: loading of modeller file broken with TypeError
-------------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: unspecified
Keywords: python3 | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
Loading of the modeller file crashes with:

{{{
GRASS 7.8.dev (Dachbegruenung):~ > g.gui.gmodeler
/scratch/Meike/GM/model_Bonn.gxm
Traceback (most recent call last):
   File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/scripts/g.gui.gmodeler", line 63, in <module>
     main()
   File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/scripts/g.gui.gmodeler", line 57, in main
     frame.LoadModelFile(options['file'])
   File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/frame.py", line 1050, in LoadModelFile
     self.model.LoadModel(filename)
   File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/model.py", line 332, in LoadModel
     x=action['pos'][0],
TypeError: 'NoneType' object is not subscriptable

g.version -rge
version=7.8.dev
date=2019
revision=82b7ad4db
build_date=2019-08-20
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=00000
libgis_date="?"
proj4=4.9.3
gdal=2.3.2
geos=3.6.1
sqlite=3.26.0
}}}

Probably a missing update to Python3?

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

#3899: g.gui.gmodeler: loading of modeller file broken with TypeError
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: python3
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by pesekon2):

It works for me and I believe that it should be fixed by this commit:
https://github.com/OSGeo/grass/commit/82793da8c6772e87c2c3de4e8f2256612d1e6c76

Could you upload your model, please?

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

#3899: g.gui.gmodeler: loading of modeller file broken with TypeError
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: python3
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by neteler):

Replying to [comment:1 pesekon2]:
> It works for me and I believe that it should be fixed by this commit:
>
https://github.com/OSGeo/grass/commit/82793da8c6772e87c2c3de4e8f2256612d1e6c76

Wonderful, it works now! Thanks a lot.

Only this msg clutter remained:

{{{
/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:952: wxPyDeprecationWarning: Call to
deprecated item. Use InsertItem instead.
   index = self.InsertStringItem(i, str(i))
/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:953: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
   self.SetStringItem(index, 0, name)
/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:954: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
   self.SetStringItem(index, 1, inloop)
/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:955: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
   self.SetStringItem(index, 2, param)
/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:956: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
   self.SetStringItem(index, 3, desc)
}}}

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

#3899: g.gui.gmodeler: loading of modeller file broken with TypeError
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: python3
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by pesekon2):

Replying to [comment:2 neteler]:

> Only this msg clutter remained:
>
> {{{
> /home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:952: wxPyDeprecationWarning: Call to
deprecated item. Use InsertItem instead.
> index = self.InsertStringItem(i, str(i))
> /home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:953: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
> self.SetStringItem(index, 0, name)
> /home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:954: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
> self.SetStringItem(index, 1, inloop)
> /home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:955: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
> self.SetStringItem(index, 2, param)
> /home/mundialis/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/dialogs.py:956: wxPyDeprecationWarning: Call to
deprecated item. Use SetItem instead.
> self.SetStringItem(index, 3, desc)
> }}}

Yes, I know. Yesterday, I have created a pull request to get rid of these
messages (they appeared on more places after switching to wxPython4):
https://github.com/OSGeo/grass/pull/120

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

#3899: g.gui.gmodeler: loading of modeller file broken with TypeError
--------------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: git-releasebranch78
Resolution: fixed | Keywords: python3
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by neteler):

* status: new => closed
* version: unspecified => git-releasebranch78
* resolution: => fixed

Comment:

Great, merged and all solved. Thanks!

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