Deprecated: Function get_magic_quotes_gpc() is deprecated in /qa-include/qa-base.php on line 1170

Warning: session_start(): Cannot start session when headers already sent in /qa-include/app/users.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /qa-include/qa-base.php:1170) in /qa-include/app/users.php on line 1282

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Warning: Cannot modify header information - headers already sent by (output started at /qa-include/qa-base.php:1170) in /qa-include/app/page.php on line 356
Problem importing layers into river databses table - RiverGIS Q&A
Recently we get enormous amount of spam registration. We have closed the registration for new members, sorry...
0 votes
343 views
by

When importing data from other spatial layers appear a phyton code error, that says:

"UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 1: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Users/carhuich/.qgis2/python/plugins\rivergis\dlg_rasImportDataIntoRasTables.py", line 298, in acceptDialog
    self.processLayers(key, data)
  File "C:/Users/carhuich/.qgis2/python/plugins\rivergis\dlg_rasImportDataIntoRasTables.py", line 282, in processLayers
    selected=self.onlySel)
  File "C:/Users/carhuich/.qgis2/python/plugins\rivergis\river_database.py", line 448, in insert_layer
    qry = self.layer_to_pgsql(features, imp_attrs, hecobject, SCHEMA, SRID)
  File "C:/Users/carhuich/.qgis2/python/plugins\rivergis\river_database.py", line 397, in layer_to_pgsql
    vals.append('\'{0}\'::{1}'.format(val, attr[2]))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 1: ordinal not in range(128)"
What does it mean?
Best regards,

Carolina.

2 Answers

0 votes
by (3.8k points)
It means, one of your layers' filename contains a non-ASCII character (like łąśćź). Please, change the layer name(s) and try to import them once again.

Regards
0 votes
by (300 points)

This kind of errors (UnicodeEncodeError) are caused by using layers which names contains non-ASCII characters (propably letters with diacritical marks). Ensure all layers you are working on (and folders where they are placed) have valid names without this kind of characters. Also try to avoid spaces in layers and folders names.

Welcome to RiverGIS Q&A, where you can ask questions and receive answers from other members of the community.

Visit rivergis.com for documentation and general info about the QGIS plugin.

Categories

...