Bug report #4667

GRASS python modules stopped to work

Added by Giovanni Manghi about 12 years ago. Updated over 9 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:GRASS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:14559

Description

The message is

Cannot start module r.external.all.py
command: /usr/share/qgis/grass/scripts//r.external.all.py --interface-description

Cannot start module v.out.ogr.pg.py
command: /usr/share/qgis/grass/scripts//v.out.ogr.pg.py --interface-description

Cannot start module qgis.v.kernel.rast.py
command: /usr/share/qgis/grass/scripts//qgis.v.kernel.rast.py --interface-description

Cannot start module db.connect-login.pg.py
command: /usr/share/qgis/grass/scripts//db.connect-login.pg.py --interface-description

Launching them from the GRASS console works as expected, as the native module GRASS GUI opens and works ok.

History

#1 Updated by Giuseppe Sucameli about 12 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

"*.py --interface-descriptor" returns 1 (instead of 0) so that error message is shown.

Those GRASS plugin py modules just call the grass.parser(), so I think this could be a GRASS bug:
the grass.parser() called from python bindings exits with a wrong code (i.e. 1) after displaying the interface description.

On Ubuntu 11.04, QGis master, GRASS 6.4.1

#2 Updated by Giuseppe Sucameli about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#3 Updated by Giuseppe Sucameli about 12 years ago

Here's the related ticket on GRASS trac: https://trac.osgeo.org/grass/ticket/1540

#4 Updated by Giuseppe Sucameli about 12 years ago

  • % Done changed from 100 to 50
  • Priority changed from Normal to Low
  • Assignee set to Giuseppe Sucameli
  • Status changed from Closed to Reopened

martinl fixed it on the GRASS side (see http://trac.osgeo.org/grass/changeset/50240).
His fix may be added in GRASS 6.4.2 (is frozen for release yet, so cross your fingers).

After that fix is backported to GRASS 6.4 branch I have to make my workaround on the QGis side working for GRASS < 6.4.2 only (or to remove it at all) to handle the retcode correctly and avoid problems in the future.

#5 Updated by Giuseppe Sucameli about 12 years ago

  • % Done changed from 50 to 100
  • Status changed from Reopened to Closed

Fixed in changeset commit:"c3fd1777a306c0312a084eeda92739be1c64d339".

#6 Updated by Giuseppe Sucameli about 12 years ago

  • % Done changed from 100 to 50
  • Status changed from Closed to Reopened

The ticket was automatically closed due to a backport of my commit from master to another branch.
I open it again, it's partially fixed.

#7 Updated by Giuseppe Sucameli about 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

#8 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#9 Updated by Paolo Cavallini about 11 years ago

  • Assignee changed from Giuseppe Sucameli to anonymous -

#10 Updated by Giuseppe Sucameli over 10 years ago

  • Status changed from Reopened to Closed

#11 Updated by Jürgen Fischer over 9 years ago

  • Assignee deleted (anonymous -)

Also available in: Atom PDF