1

When I wanto to use the command Inverse Distance Weighted in QGIS 2.0, I want to execute as batch process but when I open file it appears a window that say Error de Python

This is what it says:

Traceback (most recent call last): File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing\gui\BatchInputSelectionPanel.py", line 70, in showSelectionDialog self.text.setText(str(files[0])) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 71: ordinal not in range(128)

Python Version:

  • 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

QGIS Version:

  • 2.0.1-Dufour Dufour, ebebdf3

Ruta de Python: ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\Users\Genesis/.qgis2/python', 'C:\Users\Genesis/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGISDU~1\bin\python27.zip', 'C:\PROGRA~1\QGISDU~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISDU~1\bin', 'C:\PROGRA~1\QGISDU~1\apps\Python27', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISDU~1\apps\qgis\python\plugins\fTools\tools']

I am working with a shp file that contains a point list from a whatershed

4
  • What file format are you working with? If it's text based, I would suggest converting the encoding to UTF-8.
    – nagytech
    Commented Oct 27, 2013 at 22:24
  • it is a shp file that contains a point list from a watershed
    – Genesis
    Commented Oct 27, 2013 at 22:57
  • 1
    Check the attributes for any non UTF characters. If there are too many, try removing all fields you don't need for the analysis.
    – nagytech
    Commented Oct 27, 2013 at 23:16
  • @Geoist That's good advice. Given that a batch dialog has thrown this exception, one ought to suspect the problem may lie in the name of one of the files rather than in any of the attributes stored in those files. The error message is clear: look for a file name (fully qualified, I suspect) containing the high-end ASCII character 0xf3 ("ó") as its 71st character.
    – whuber
    Commented Oct 28, 2013 at 13:53

1 Answer 1

3

As whuber pointed, the problem its with the name of the file. Rename it without using accents or spaces or any non basic character.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.