Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python error when trying import a layer that has a name containing special chars #71

Open
gioman opened this issue May 4, 2017 · 1 comment
Assignees
Labels

Comments

@gioman
Copy link
Contributor

gioman commented May 4, 2017

tested on master revision code and against GS 2.11

Traceback (most recent call last):
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/explorer.py", line 101, in run
    command(*params)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/confirm.py", line 20, in publishLayer
    catalog.publishLayer(layer, workspace, True, name)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/catalog.py", line 499, in publishLayer
    gslayer = self.catalog.get_layer(name)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/ext-libs/gsconfig-1.0.6-py2.7.egg/geoserver/catalog.py", line 729, in get_layer
    lyr.fetch()
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/ext-libs/gsconfig-1.0.6-py2.7.egg/geoserver/support.py", line 176, in fetch
    self.dom = self.catalog.get_xml(self.href)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/geoserver/basecatalog.py", line 143, in get_xml
    raise FailedRequestError("Tried to make a GET request to %s but got a %d status code: \n%s" % (rest_url, response.status, content))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
@gioman gioman added the bug label May 4, 2017
@gioman
Copy link
Contributor Author

gioman commented May 4, 2017

@volaya when trying to import a layer (a shapefile for example) that has a name with spaces, then Geoserver Explorer shows a dialog proposing to choose a laundered layer name, in this case with "_" in place of spaces. This would be nice to be done also for special chars replacing the alike of ã é... with a e... Not what should be the drill with characters from languages like arabic, chinese, etc.

volaya added a commit that referenced this issue Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants