Opened 5 years ago

Closed 4 years ago

#3882 closed defect (fixed)

winGRASS: not able to digitize vector polygons

Reported by: hellik Owned by: grass-dev@…
Priority: blocker Milestone: 7.8.1
Component: wxGUI Version: git-releasebranch78
Keywords: python3, wingrass Cc:
CPU: x86-64 Platform: MSWindows

Description

tested with

System Info                                                                     
GRASS version: 7.7.dev                                                          
Code revision: 5249e44ac                                                        
Build date: 2019-07-24                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.1                                                                     
PROJ.4: 5.2.0                                                                   
GEOS: 3.7.2                                                                     
SQLite: 3.26.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.18362-SP0 (OSGeo4W)    

steps done in NC sample data set

  • add elevatin as background raster
  • map display -> vector digitizer
  • new vector, add some additional columns in attribute table
  • choosing the button digitize new area
  • a message pops up that no appropriate tool is choosen (screenshot will be added)
  • you have to press the button digitize new point or digitize new line, then press the button digitize new area
  • digitizing the area's boundary, try to close the area, but only the boundary is digitized, no area is generated
  • doing the same in winGRASS7.6.1, closing the boundary generates a new area

a lot of warnings and errors are in the console:

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\gth
read.py", line 121, in OnDone

event.ondone(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 469, in OnRenderDone

self.updateProgress.emit(layer=self.layer)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 743, in ReportProgress

self.renderDone.emit()
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 650, in OnRenderDone

raise GException(_("Rendering failed: %s" % msg))
core.gcmd
.
GException
:
Rendering failed: Expecting 807x466 image but got 807x501
image.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 856, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 922, in StartEditing

self.EnableAll()
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 223, in EnableAll

for item in self._toolbarData():
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 268, in _toolbarData

return self._getToolbarData(data)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 233, in _getToolbarData

retData.append(self._defineTool(*args))
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 241, in _defineTool

return (name, icon.GetBitmap(),
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Editing of vector map <mytest4@user1> successfully finished                     
Building topology for vector map <mytest4@user1>...
Registering primitives...
Building areas...
Attaching islands...
Attaching centroids...

Attachments (1)

message_digitize_new_area.PNG (16.7 KB ) - added by hellik 5 years ago.
area digitizing message

Download all attachments as: .zip

Change History (16)

by hellik, 5 years ago

area digitizing message

comment:1 by hellik, 5 years ago

see also ticket #3871

comment:2 by annakrat, 5 years ago

This is probably specific to non-english locale on windows, it's some wxPython issue.

Could you try this?

--- a/gui/wxpython/wxgui.py
+++ b/gui/wxpython/wxgui.py
@@ -164,7 +164,7 @@ def main(argv=None):
 
     # register GUI PID
     registerPid(os.getpid())
-
+    app.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
     app.MainLoop()
 
 if __name__ == "__main__":

Does it help? Any unintended consequences?

in reply to:  2 comment:3 by hellik, 5 years ago

Replying to annakrat:

This is probably specific to non-english locale on windows, it's some wxPython issue.

yes, it is a non-english locale on windows.

in reply to:  2 comment:4 by hellik, 5 years ago

Replying to annakrat:

This is probably specific to non-english locale on windows, it's some wxPython issue.

Could you try this?

--- a/gui/wxpython/wxgui.py
+++ b/gui/wxpython/wxgui.py
@@ -164,7 +164,7 @@ def main(argv=None):
 
     # register GUI PID
     registerPid(os.getpid())
-
+    app.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
     app.MainLoop()
 
 if __name__ == "__main__":

Does it help? Any unintended consequences?

locally applied the patch, no change; still not able to digitize an area

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\gth
read.py", line 121, in OnDone

event.ondone(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 469, in OnRenderDone

self.updateProgress.emit(layer=self.layer)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 743, in ReportProgress

self.renderDone.emit()
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass77\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\ren
der.py", line 650, in OnRenderDone

raise GException(_("Rendering failed: %s" % msg))
core.gcmd
.
GException
:
Rendering failed: Expecting 807x466 image but got 807x501
image.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 856, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 922, in StartEditing

self.EnableAll()
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 223, in EnableAll

for item in self._toolbarData():
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 268, in _toolbarData

return self._getToolbarData(data)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 233, in _getToolbarData

retData.append(self._defineTool(*args))
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\gui_core
\toolbars.py", line 241, in _defineTool

return (name, icon.GetBitmap(),
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Bearbeitung der Vektorkarte <mytest4@user1> erfolgreich abgeschlossen           
Erstelle Topologie für die Vektorkarte <mytest4@user1>...
Registriere Primitive...
Erzeuge Flächen...
Füge Inseln hinzu...
Füge Zentroide hinzu...
Last edited 5 years ago by hellik (previous) (diff)

comment:5 by neteler, 5 years ago

Priority: blockercritical

Dupe of #3871?

Please re-test with latest 7.8

comment:6 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:7 by neteler, 5 years ago

Keywords: py3 removed
Summary: winGRASS Version: 7.7.dev - not able to digitize vector polygonswinGRASS: not able to digitize vector polygons
Version: svn-trunkgit-releasebranch78

Any news?

comment:8 by hellik, 4 years ago

tested with

System Info                                                                     
GRASS Version: 7.8.1dev                                                         
Code revision: d1c4ad132                                                        
Build date: 2019-10-22                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.1                                                                     
PROJ: 5.2.0                                                                     
GEOS: 3.8.0                                                                     
SQLite: 3.29.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.18362-SP0 (OSGeo4W) 

still the same behaviour as in the original description; it's not possible to digitize areas.

quite a lot of error messages:

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\gth
read.py", line 121, in OnDone

event.ondone(event)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 469, in OnRenderDone

self.updateProgress.emit(layer=self.layer)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 743, in ReportProgress

self.renderDone.emit()
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 650, in OnRenderDone

raise GException(_("Rendering failed: %s" % msg))
core.gcmd
.
GException
:
Rendering failed: Expecting 807x466 image but got 807x501
image.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 856, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 922, in StartEditing

self.EnableAll()
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 223, in EnableAll

for item in self._toolbarData():
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 268, in _toolbarData

return self._getToolbarData(data)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 233, in _getToolbarData

retData.append(self._defineTool(*args))
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 241, in _defineTool

return (name, icon.GetBitmap(),
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.


Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 407, in OnAddAreaMenu

self._onMenu(menuItems)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 252, in _onMenu

item.SetBitmap(icon.GetBitmap(self.parent.iconsize))
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 96, in GetBitmap

image = wx.Image(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\gth
read.py", line 121, in OnDone

event.ondone(event)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 469, in OnRenderDone

self.updateProgress.emit(layer=self.layer)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 743, in ReportProgress

self.renderDone.emit()
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 650, in OnRenderDone

raise GException(_("Rendering failed: %s" % msg))
core.gcmd
.
GException
:
Rendering failed: Expecting 807x466 image but got 807x501
image.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 856, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 922, in StartEditing

self.EnableAll()
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 223, in EnableAll

for item in self._toolbarData():
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 268, in _toolbarData

return self._getToolbarData(data)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 233, in _getToolbarData

retData.append(self._defineTool(*args))
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 241, in _defineTool

return (name, icon.GetBitmap(),
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\lmgr\lay
ertree.py", line 460, in OnLayerContextMenu

item.SetBitmap(MetaIcon(img='layer-
remove').GetBitmap(self.bmpsize))
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 96, in GetBitmap

image = wx.Image(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\lmgr\lay
ertree.py", line 460, in OnLayerContextMenu

item.SetBitmap(MetaIcon(img='layer-
remove').GetBitmap(self.bmpsize))
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 96, in GetBitmap

image = wx.Image(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.

comment:9 by hellik, 4 years ago

Priority: criticalblocker

in reply to:  2 comment:10 by hellik, 4 years ago

Replying to annakrat:

This is probably specific to non-english locale on windows, it's some wxPython issue.

Could you try this?

--- a/gui/wxpython/wxgui.py
+++ b/gui/wxpython/wxgui.py
@@ -164,7 +164,7 @@ def main(argv=None):
 
     # register GUI PID
     registerPid(os.getpid())
-
+    app.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
     app.MainLoop()
 
 if __name__ == "__main__":

Does it help? Any unintended consequences?

patch locally applied to

GRASS Version: 7.8.1dev                                                         
Code revision: d1c4ad132                                                        
Build date: 2019-10-22                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.1                                                                     
PROJ: 5.2.0                                                                     
GEOS: 3.8.0                                                                     
SQLite: 3.29.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.18362-SP0 (OSGeo4W)   

patch doesn't help to digitize areas.

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\gth
read.py", line 121, in OnDone

event.ondone(event)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 469, in OnRenderDone

self.updateProgress.emit(layer=self.layer)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 743, in ReportProgress

self.renderDone.emit()
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass78\etc\python\grass\pydi
spatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\core\ren
der.py", line 650, in OnRenderDone

raise GException(_("Rendering failed: %s" % msg))
core.gcmd
.
GException
:
Rendering failed: Expecting 807x466 image but got 807x501
image.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 856, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 922, in StartEditing

self.EnableAll()
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 223, in EnableAll

for item in self._toolbarData():
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 268, in _toolbarData

return self._getToolbarData(data)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 233, in _getToolbarData

retData.append(self._defineTool(*args))
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\gui_core
\toolbars.py", line 241, in _defineTool

return (name, icon.GetBitmap(),
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 391, in OnAddAreaTool

self.OnAddArea(event)
  File "C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\vdigit\t
oolbars.py", line 369, in OnAddArea

self.addArea, self.icons['addArea'].GetBitmap())
  File
"C:\OSGEO4~1\apps\grass\grass78\gui\wxpython\icons\icon.py",
line 100, in GetBitmap

bmp = wx.Bitmap(name=self.imagepath)
wx._core
.
wxAssertionError
:
C++ assertion "wxString::Format("%.3f", 1.23).find(str) !=
wxString::npos" failed at ..\..\src\common\intl.cpp(1648) in
wxLocale::GetInfo(): Decimal separator mismatch -- did you
use setlocale()?If so, use wxLocale to change the locale
instead.
Bearbeitung der Vektorkarte <mytestvect@user1> erfolgreich abgeschlossen        
Erstelle Topologie für die Vektorkarte <mytestvect@user1>...
Registriere Primitive...

comment:11 by annakrat, 4 years ago

There are 2 issues there, this should fix one of them: https://github.com/OSGeo/grass/pull/161

in reply to:  11 comment:12 by hellik, 4 years ago

comment:13 by annakrat, 4 years ago

Merged and backported. The solution to the locale problem is not ideal, we should keep an eye on it if it causes problems.

comment:14 by hellik, 4 years ago

tested with

GRASS Version: 7.8.1dev                                                         
Code revision: f5bfe545c                                                        
Build date: 2019-10-27                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.1                                                                     
PROJ: 5.2.0                                                                     
GEOS: 3.8.0                                                                     
SQLite: 3.29.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.18362-SP0 (OSGeo4W)

digitizing areas works now, closing ticket.

comment:15 by hellik, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.