[GRASS-user] How to force remove broken vector layers?

Markus Metz markus.metz.giswork at gmail.com
Wed Apr 10 05:55:45 PDT 2013


On Wed, Apr 10, 2013 at 2:45 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Wed, Apr 10, 2013 at 2:05 PM, Allar Haav <allar.haav at gmail.com> wrote:
>> Hi,
>>
>> As for the latest compiled WinGRASS7, which at the moment (from osgeo4w) is
>> r55677-547, then this gives the error right at the startup of grass7 (i.e.
>> after g.gui command):
>> GRASS 7.0.svn> Traceback (most recent call last):
>>   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\wxgui.py", line
>> 34, in <module>
>>     from lmgr.frame import GMFrame
>>   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\frame.py",
>> line 69, in <module>
>>     from lmgr.pyshell          import PyShellWindow
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\pyshell.py", line
>> 27, in <module>
>>     import grass.pygrass as pygrass
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\__init__.py",
>> line 17, in <module>
>>     import modules
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\__init__.py",
>> line 11, in <module>
>>     import grid
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\__init__.py",
>> line 9, in <module>
>>     import grid
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\grid.py",
>> line 20, in <module>
>>     _GREG = Module('g.region')
>>   File
>> "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\interface\module.py",
>> line 87, in __init__
>>     raise GrassError(str_err % self.name)
>> grass.pygrass.errors.GrassError: "Module 'g.region' not found, please check
>> that the module exist"
>
> IMHO it is a very bad idea to load pygrass together with the gui, as
> bad as loading nviz or anything else that uses ctypes when the gui is
> loaded. Anything that uses ctypes should be started upon user request
> as a separate process. I am going to revert r55395 (tested on
> Windows).

r55395 has been reverted with r55682. With the next nightly build,
wingrass should work again, including GUI and deleting vectors.

Markus M

>
>>
>> Therefore I've been using an older build (r55595-540) with which I have this
>> curious vector layer deletion issue (which I'm sure I didn't have a few
>> weeks ago at least). It doesn't matter whether I try to do it in a script or
>> not, g.remove does not remove vector layers completely. It seems to get
>> stuck with hist file. There is a chance though that the issue isn't apparent
>> in a newer build.
>> One probable solution would be moving on to Unix though.
>>
>> Allar
>>
>>
>>
>> On 10/04/2013 12:22, Pietro wrote:
>>>
>>> Hi Allar,
>>>
>>> On Tue, Apr 9, 2013 at 4:20 PM, Allar Haav <allar.haav at gmail.com> wrote:
>>>>
>>>> The GRASS 7 I'm running currently however is a week-old r55595-540 as the
>>>> later ones have been giving the error regarding pygrass and g.region at
>>>> startup. Could this be the key to my issue?
>>>
>>>
>>> Can you provide the code that you are using?
>>>
>>> As I said in grass-dev[0], at the moment the shortcuts are not working
>>> properly.
>>>
>>> Pietro
>>>
>>> [0] http://lists.osgeo.org/pipermail/grass-dev/2013-April/062894.html
>>
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list