[GRASS-dev] g.proj not found

Hi devs,

just update grass7 and the gui doesn't start, the problem seems
related to missing module g.proj, but I think probably is related to
find_program.
find_program('r.proj','help') and also find_program('r.proj') return
false instead find_program('ls') return true

the error is

GRASS module 'g.proj' not found. Unable to start map display window.

I have the same error compiling after a distclean in g.gui.vdigit command.

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On Fri, Jun 21, 2013 at 9:58 AM, Luca Delucchi <lucadeluge@gmail.com> wrote:

Hi devs,

just update grass7 and the gui doesn't start, the problem seems
related to missing module g.proj, but I think probably is related to
find_program.
find_program('r.proj','help') and also find_program('r.proj') return
false instead find_program('ls') return true

the error is

GRASS module 'g.proj' not found. Unable to start map display window.

Fixed in r56865.

Markus M

Luca wrote:

just update grass7 and the gui doesn't start, the problem seems
related to missing module g.proj, but I think probably is related to
find_program.
find_program('r.proj','help') and also
find_program('r.proj') return
false instead find_program('ls') return true

the error is

GRASS module 'g.proj' not found. Unable to start map display window.

I have the same error compiling after a distclean in g.gui.vdigit command.

Hi Luca,

I saw the same earlier today, under the current version of find_program() it
needs to be like:

find_program('r.proj', ['help'])

but that way of calling it may or may not change again in the coming days so
I was just rolling with it for now, it's a dev branch after all.

Index: gui_core/mapdisp.py

--- gui_core/mapdisp.py (revision 56845)
+++ gui_core/mapdisp.py (working copy)
@@ -105,7 +105,7 @@
def _initMap(self, Map):
"""!Initialize map display, set dimensions and map region
"""
- if not grass.find_program('g.region'):
+ if not grass.find_program('g.region', ['--help']):
sys.exit(_("GRASS module '%s' not found. Unable to start map "
"display window.") % 'g.region')

Index: core/render.py

--- core/render.py (revision 56845)
+++ core/render.py (working copy)
@@ -451,7 +451,7 @@
"""!Return region projection and map units information
"""
projinfo = dict()
- if not grass.find_program('g.proj'):
+ if not grass.find_program('g.proj', ['--help']):
sys.exit(_("GRASS module '%s' not found. Unable to start map "
"display window.") % 'g.proj')

Index: gui_core/gselect.py

--- gui_core/gselect.py (revision 56845)
+++ gui_core/gselect.py (working copy)
@@ -1803,7 +1803,7 @@
driver = 'pg').splitlines()
if db is not None:
win.SetItems(sorted(db))
- elif grass.find_program('psql'):
+ elif grass.find_program('psql', ['--help']):
if not win.GetItems():
p = grass.Popen(['psql', '-ltA'], stdout = grass.PIPE)
ret = p.communicate()[0]

regards,
Hamish