Opened 11 years ago

Closed 11 years ago

#1330 closed defect (fixed)

wxGUI: "UnicodeEncodeError: 'ascii' codec can't encode characters" in pl_PL.UTF-8

Reported by: msieczka Owned by: martinl
Priority: major Milestone: 6.4.2
Component: wxGUI Version: svn-releasebranch64
Keywords: ascii Cc: grass-dev@…
CPU: All Platform: Linux

Description

Debian squeeze amd64, releasebranch_6_4 r45717.

  1. Start wxGUI in pl_PL.UTF-8.
  2. Add any raster or vector layer.
  3. Change it's opacity level.

Try to save a project - error:

Zapis bieżących ustawień do pliku projektu nie powiódł się.

Powód: 'ascii' codec can't encode characters in position 66-67: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/local/grass-6.4.1svn/etc/wxpython/wxgui.py", line 844, in SaveToWorkspaceFile
    workspace.WriteWorkspaceFile(lmgr = self, file = tmpfile)
  File "/usr/local/grass-6.4.1svn/etc/wxpython/gui_modules/workspace.py", line 734, in __init__
    self.__writeLayer(mapTree, item)
  File "/usr/local/grass-6.4.1svn/etc/wxpython/gui_modules/workspace.py", line 781, in __writeLayer
    (' ' * self.indent, type, name, checked, opacity));
UnicodeEncodeError: 'ascii' codec can't encode characters in position 66-67: ordinal not in range(128)

Can't also remove the problematic layer from the list - similar error:

Traceback (most recent call last):
  File "/usr/local/grass-6.4.1svn/etc/wxpython/wxgui.py",
line 1395, in OnDeleteLayer

name = str(self.curr_page.maptree.GetItemText(item))
UnicodeEncodeError
:
'ascii' codec can't encode characters in position 31-32:
ordinal not in range(128)

Change History (5)

comment:1 by martinl, 11 years ago

Cc: grass-dev@… added
Keywords: ascii added
Milestone: 6.4.16.4.2
Owner: changed from grass-dev@… to martinl
Status: newassigned

Please try out GRASS 6.5, should be working there. Changing milestone to 6.4.2. Name of raster/vector contains only ASCII characters?

in reply to:  1 ; comment:2 by msieczka, 11 years ago

Replying to martinl:

Please try out GRASS 6.5, should be working there.

Doesn't work in 6.5 r45717 either:

Zapis bieżących ustawień do pliku projektu nie powiódł się.

Powód: 'ascii' codec can't encode characters in position 66-67: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 918, in SaveToWorkspaceFile
    workspace.WriteWorkspaceFile(lmgr = self, file = tmpfile)
  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/workspace.py", line 734, in __init__
    self.__writeLayer(mapTree, item)
  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/workspace.py", line 781, in __writeLayer
    (' ' * self.indent, type, name, checked, opacity));
UnicodeEncodeError: 'ascii' codec can't encode characters in position 66-67: ordinal not in range(128)

Changing milestone to 6.4.2.

6.4.1 impossible?

Name of raster/vector contains only ASCII characters?

Yes. The culprit seems to be the Polish word for "opacity" - "nieprzeźroczystość", which wxGUI has problem to deal with.

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

Replying to msieczka:

Replying to martinl:

Please try out GRASS 6.5, should be working there.

Doesn't work in 6.5 r45717 either:

Testing G65 with polish locale, "opacity" not translated, no errors.

Changing milestone to 6.4.2.

6.4.1 impossible?

Yes, too late. For 6.4.2 I am planning major update of wxGUI (from devbr6).

Martin

comment:4 by martinl, 11 years ago

Please try out r46771 (backported also to devbr6 and relbr64)

comment:5 by martinl, 11 years ago

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