Opened 11 years ago

Closed 11 years ago

#2188 closed defect (fixed)

GRASS fails to start on Windows since r58807

Reported by: annakrat Owned by: grass-dev@…
Priority: critical Milestone: 7.0.0
Component: wxGUI Version: svn-trunk
Keywords: pygrass, tgis Cc:
CPU: Unspecified Platform: Unspecified

Description

Adding temporal vector algebra (r58807) broke compilation on Windows and some Ubuntu machines. During start up it fails:

Cleaning up temporary files...
Starting GRASS GIS...
Traceback (most recent call last):
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\gui\wxpython\gis_set.py", l
ine 48, in <module>
    from gui_core.dialogs import TextEntryDialog
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\gui\wxpython\gui_core\dialo
gs.py", line 49, in <module>
    from gui_core.gselect import LocationSelect, MapsetSelect, Select, \
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\gui\wxpython\gui_core\gsele
ct.py", line 59, in <module>
    import grass.temporal as tgis
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\python\grass\temporal\__ini
t__.py", line 29, in <module>
    from temporal_vector_algebra import *
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\python\grass\temporal\tempo
ral_vector_algebra.py", line 436, in <module>
    m_overlay = pygrass.Module('v.overlay', quiet=True, run_=False)
  File "C:\Program Files (x86)\GRASS GIS 7.0.svn\etc\python\grass\pygrass\module
s\interface\module.py", line 247, in __init__
    raise GrassError(str_err % self.name)
grass.pygrass.errors.GrassError: "Module 'v.overlay' not found, please check tha
t the module exist"
Error in GUI startup. If necessary, please report this error to the GRASS develo
pers.

I will move the tgis import to the places where it's actually needed, so it won't be imported when the gui starts. But still I am not sure about the other imports in temporal_vector_algebra.py. Can tgis be used without pygrass? Is pygrass needed for temporal vector algebra only? The imports should be more careful. Also it would be good to understand what's the problem with pygrass.Module v.overlay.

Change History (5)

comment:1 by annakrat, 11 years ago

Tgis import moved in r58883.

in reply to:  description ; comment:2 by zarch, 11 years ago

Hi Anna,

Replying to annakrat:

Also it would be good to understand what's the problem with pygrass.Module v.overlay.


The problem is that Module try to run:

get_cmd_xml = subprocess.Popen([cmd, "--interface-description"],
                               stdout=subprocess.PIPE)

But an OSError is raised.

I've modified the code to give a clearer message and avoid to mask the original error, see (r58885).

in reply to:  2 comment:3 by annakrat, 11 years ago

Replying to zarch:

Hi Anna,

Replying to annakrat:

Also it would be good to understand what's the problem with pygrass.Module v.overlay.


The problem is that Module try to run:

get_cmd_xml = subprocess.Popen([cmd, "--interface-description"],
                               stdout=subprocess.PIPE)

But an OSError is raised.

I've modified the code to give a clearer message and avoid to mask the original error, see (r58885).

GRASS starts again, however temporal framework is not working because the original problem is still there. PyGRASS Module class is not working on Windows (I created ticket #2189). Discussion in #2067 suggests that during import, no PyGRASS Module should be created which is unfortunately happening in temporal_vector_algebra.py.

comment:4 by huhabla, 11 years ago

I committed a patch that should solve the import problem of the temporal vector algebra, please try r58915. I have removed the PyGRASS module creation at import time, which is bad by design.

in reply to:  4 comment:5 by annakrat, 11 years ago

Resolution: fixed
Status: newclosed

Replying to huhabla:

I committed a patch that should solve the import problem of the temporal vector algebra, please try r58915. I have removed the PyGRASS module creation at import time, which is bad by design.

Thanks a lot. We fixed also the #2189 in PyGRASS, so now everything should be working.

Note: See TracTickets for help on using tickets.