[GRASS-dev] [GRASS GIS] #2524: wxGUI v.in.ogr wrapper fails to find any layers if file path contains non-latin letters

GRASS GIS trac at osgeo.org
Tue Mar 14 02:02:18 PDT 2017


#2524: wxGUI v.in.ogr wrapper fails to find any layers if file path contains non-
latin letters
--------------------------+-----------------------------
  Reporter:  marisn       |      Owner:  grass-dev@…
      Type:  defect       |     Status:  reopened
  Priority:  normal       |  Milestone:  7.4.0
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  encoding
       CPU:  Unspecified  |   Platform:  MSWindows Vista
--------------------------+-----------------------------

Comment (by hellik):

 Replying to [comment:6 marisn]:
 > Tested import tool (File -> Import vector -> Common formats) - when
 choosing a Shapefile, no layers are listed and thus it is still impossible
 to import anything.
 > This issue affects also v.import and v.in.ogr as all of them seem to
 share the same UI components.
 >
 > {{{
 > GRASS versija: 7.3.svn
 > GRASS SVN revīzija: r70508
 > Būvējuma datums: 2017-01-09
 > Būvēšanas platforma: x86_64-w64-mingw32
 > GDAL: 2.1.2
 > PROJ.4: 4.9.3
 > GEOS: 3.5.0
 > SQLite: 3.14.1
 > Python: 2.7.5
 > wxPython: 2.8.12.1
 > Platforma: Windows-8-6.2.9200 (OSGeo4W
 > }}}

 confirmed, tested here:

 {{{
 System Info
 GRASS version: 7.2.0
 GRASS SVN revision: r70156
 Build date: 2016-12-29
 Build platform: x86_64-w64-mingw32
 GDAL: 2.1.2
 PROJ.4: 4.9.3
 GEOS: 3.5.0
 SQLite: 3.14.1
 Python: 2.7.5
 wxPython: 2.8.12.1
 Platform: Windows-8-6.2.9200 (OSGeo4W)
 }}}


 {{{
 Traceback (most recent call last):
   File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8
 -msw-unicode\wx\lib\filebrowsebutton.py", line 140, in
 OnChanged

 self.changeCallback(evt)
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\gui\wxpython\gui_
 core\gselect.py", line 2055, in OnUpdate

 self._reloadLayers()
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\gui\wxpython\gui_
 core\gselect.py", line 2103, in _reloadLayers

 input=dsn)
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\gui\wxpython\core
 \gcmd.py", line 705, in RunCommand

 quiet, verbose, **kwargs))
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\etc\python\grass\
 script\core.py", line 311, in make_command

 args.append(opt + b'=' + _make_val(val))
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\etc\python\grass\
 script\core.py", line 98, in _make_val

 return encode(val)
   File "C:\OSGEO4~1\apps\grass\grass-7.2.0\etc\python\grass\
 script\utils.py", line 177, in encode

 return string.encode(enc) if enc else string.encode()
   File "C:\OSGEO4~1\apps\Python27\lib\encodings\cp1252.py",
 line 12, in encode

 return codecs.charmap_encode(input,errors,encoding_table)
 UnicodeEncodeError
 :
 'charmap' codec can't encode character u'\u013c' in position
 36: character maps to <undefined>
 }}}


 {{{
 System Info
 GRASS version: 7.3.svn
 GRASS SVN revision: r70750M
 Build date: 2017-03-14
 Build platform: x86_64-w64-mingw32
 GDAL: 2.1.2
 PROJ.4: 4.9.3
 GEOS: 3.5.0
 SQLite: 3.14.1
 Python: 2.7.5
 wxPython: 2.8.12.1
 Platform: Windows-8-6.2.9200 (OSGeo4W)
 }}}


 {{{
 Traceback (most recent call last):
   File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8
 -msw-unicode\wx\lib\filebrowsebutton.py", line 140, in
 OnChanged

 self.changeCallback(evt)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\gu
 i_core\gselect.py", line 2071, in OnUpdate

 self._reloadLayers()
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\gu
 i_core\gselect.py", line 2119, in _reloadLayers

 input=dsn)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\co
 re\gcmd.py", line 705, in RunCommand

 quiet, verbose, **kwargs))
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
 s\script\core.py", line 312, in make_command

 args.append(opt + b'=' + _make_val(val))
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
 s\script\core.py", line 99, in _make_val

 return encode(val)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
 s\script\utils.py", line 184, in encode

 return string.encode(enc)
   File "C:\OSGEO4~1\apps\Python27\lib\encodings\cp1252.py",
 line 12, in encode

 return codecs.charmap_encode(input,errors,encoding_table)
 UnicodeEncodeError
 :
 'charmap' codec can't encode character u'\u013c' in position
 36: character maps to <undefined>
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2524#comment:7>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list