Opened 11 years ago

Closed 11 years ago

#2011 closed defect (fixed)

WxGUI, menu does not work at all (languages using double-byte characters)

Reported by: venkat Owned by: grass-dev@…
Priority: critical Milestone: 6.4.3
Component: wxGUI Version: 6.4.3 RCs
Keywords: encoding, wingrass, osgeo4w Cc:
CPU: Unspecified Platform: MSWindows 7


Testing GRASS6.4.3RC3 on Windows7 and Windows8

Several of WX-Python menu give error as shown below.

For example,

a) start GRASS and display Raster image b) choose r.colors (or others from raster pull down menu c) Result is the error shown below

This may be same problem as OSGEO4W Track ticket#1380

Similar problem was fixed in GRASS-6.4.2 but has crept in again in GRASS-6.4.3RC2, GRASS-6.4.3RC3

File "C:\OSGeo4W\apps\grass\grass-6.4.3RC3\etc\wxpython\lm

gr\", line 541, in GetMenuCmd

input = GUI().GetCommandInputMapParamKey(cmdlist[0])

File "C:\OSGeo4W\apps\grass\grass-6.4.3RC3\etc\wxpython\gu

i_core\", line 1970, in GetCommandInputMapParamKey

p = re.compile('encoding="' + enc + '"', re.IGNORECASE) NameError : global name 're' is not defined



Change History (6)

comment:1 by hamish, 11 years ago

"re.*" is the regular expression library, there should be a "import re" somewhere.

does "import re" work from the python tab in the layer manager? maybe it isn't being packaged?


comment:2 by hamish, 11 years ago

Keywords: osgeo4w added

(ticket is for osgeo4w, not the standalone installer)

for the stand-alone nightly build of 6.4.3svn, is there in C:\Program Files\GRASS...\Python27\Lib, and imports ok in the python shell tab of the layer manager. r.colors and the r.colors interactive wrapper both open ok there.

I'm unable to test multi-byte language Windows, but seeing as the error is name 're' is not defined my first guess is the missing library.



comment:3 by hamish, 11 years ago

try opening C:\OSGeo4W\apps\grass\grass-6.4.3RC3\etc\wxpython\gui_core\ in a text editor, and adding the line "import re" about line 50 with all the other import statements. uses re.() but never imports it. I guess it is not always a built-in?


comment:4 by venkat, 11 years ago

"import re" works in the python tab in the layer manager. In fact, the problem is not only for r.colors but for all the menu items from the "Raster" pulldown (r.distance, r.buffer etc.).

Typing the command (r.colors, r,buffer etc.) brings up the command panel without the error I reported. Problem is when we select from the pulldown "Raster" menu.


comment:5 by venkat, 11 years ago

Priority: blockercritical

Added "import re" to and it worked.

Appropriate change before the next build would fix this issue.



comment:6 by hamish, 11 years ago

Resolution: fixed
Status: newclosed

fix applied in devbr6 and relbr64 with r56763,4. Anna had already taken care of it in trunk.


Note: See TracTickets for help on using tickets.