[GRASS-dev] Problem starting GRASS GUI - ntpath splitdrive
Pedro Venâncio
pedrongvenancio at gmail.com
Tue Nov 6 12:11:50 PST 2018
Hi Helmut,
Helmut Kudrnovsky <hellik web.de> escreveu no dia terça, 6/11/2018 à(s)
19:24:
> >C:\>grass74
> >Cleaning up temporary files...
> >Starting GRASS GIS...
> >ERROR: Invalid return code from GUI startup script.
> >Please advise GRASS developers of this error.
> >Exiting...
> >Press any key to continue . . .
>
> what is the invalid return code?
>
The error falls here, like Markus said:
def gui_startup(grass_gui):
"""Start GUI for startup (setting gisrc file)"""
if grass_gui in ('wxpython', 'gtext'):
ret = call([os.getenv('GRASS_PYTHON'), wxpath("gis_set.py")])
# this if could be simplified to three branches (0, 5, rest)
# if there is no need to handle unknown code separately
if ret == 0:
pass
elif ret in [1, 2]:
# 1 probably error coming from gis_set.py
# 2 probably file not found from python interpreter
# formerly we were starting in text mode instead, now we just fail
# which is more straightforward for everybody
fatal(_("Error in GUI startup. See messages above (if any)"
" and if necessary, please"
" report this error to the GRASS developers.\n"
"On systems with package manager, make sure you have the
right"
" GUI package, probably named grass-gui, installed.\n"
"To run GRASS GIS in text mode use the -text flag.\n"
"Use '--help' for further options\n"
" {cmd_name} --help\n"
"See also:
https://grass.osgeo.org/{cmd_name}/manuals/helptext.html").format(
cmd_name=cmd_name))
elif ret == 5: # defined in gui/wxpython/gis_set.py
# User wants to exit from GRASS
message(_("Exit was requested in GUI.\nGRASS GIS will not start.
Bye."))
sys.exit(0)
else:
fatal(_("Invalid return code from GUI startup script.\n"
"Please advise GRASS developers of this error."))
>
> is there another python installation on this windows system?
>
>
Yes, I've Python 2.7 and Python 3.7, both instaled with OSGeo4W, one for
QGIS 2.18 and another for QGIS 3.4. But I've the same on another machine.
> >The strange thing is that both systems are similar, and it works in one,
> and not in another.
>
> can you delete all the content in:
>
> C:\Users\YourUserName\AppData\Roaming\GRASS7
>
> and try to restart
>
>
I already tested this, but after delete it, it only create an empty GRASS7
folder.
>
> what is happening when you're in text mode and do
>
> C:\>g.gui wxpython
>
> ?
C:\>g.gui wxpython
Launching <wxpython> GUI in the background, please wait...
C:\>
but it does not launch the GUI. Looking at the windows task manager
processes, the GRASS GUI process shows up, but closes right after a second
or so.
Thank you very much for the help Helmut and Markus!
Best regards,
Pedro
-------------- próxima parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181106/7bc4b392/attachment.html>
More information about the grass-dev
mailing list