2

I'm trying to fix some invalid geometries using the Make Valid LWGEOM algorithm in QGIS 2.8.3 processing toolbox but a Python error occurs:

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last): File "C:/Users/Angelo/.qgis2/python/plugins\processing\gui\AlgorithmDialog.py", line 200, in accept if runalg(self.alg, self): File "C:/Users/Angelo/.qgis2/python/plugins\processing\gui\AlgorithmExecutor.py", line 51, in runalg alg.execute(progress) File "C:/Users/Angelo/.qgis2/python/plugins\processing\core\GeoAlgorithm.py", line 248, in execute str(e) + self.tr('\nSee log for more details')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 19: ordinal not in range(128)

Versione Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

Versione di QGIS: 2.8.3-Wien Wien, 313a6bc

Percorso Python: ['C:/Users/Angelo/.qgis2/python/plugins\processinglwgeomprovider', 'C:/Users/Angelo/.qgis2/python/plugins\processing', 'C:/PROGRA~1/QGISWI~1/apps/qgis-ltr/./python', u'C:/Users/Angelo/.qgis2/python', u'C:/Users/Angelo/.qgis2/python/plugins', 'C:/PROGRA~1/QGISWI~1/apps/qgis-ltr/./python/plugins', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\bin\python27.zip', 'C:\PROGRA~1\QGISWI~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISWI~1\bin', 'C:\PROGRA~1\QGISWI~1\apps\Python27', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', u'C:/Users/Angelo/.qgis2//python', 'C:\Users\Angelo\.qgis2\python\plugins\mmqgis/forms', 'C:\PROGRA~1\QGISWI~1\apps\qgis-ltr\python\plugins\fTools\tools']

How can I fix it? Or which other method could I use to fix the invalid geometries? I have to fix some shapefiles which may contain hundreds of invalid ones so I can't do it manually... I also tried the same procedure in QGIS 2.10.1 but the same error occurs...

8
  • this seems a Procesing Toolbox bug simply to fix changing str(e) with relative unicode encoding... It does not seems related with the LWGEOM provider. Please open qgis tiket following these instructions hub.qgis.org/wiki/17/Bugreports Aug 11, 2015 at 13:01
  • as workaround probably in the message of the exception there are filenames or directories with non ascii chars like accents and so on => remove accents or 'strange' chars... I don't imagine could be an exception related with record name. Aug 11, 2015 at 13:04
  • @LuigiPirelli I edited the question to add the full error message, I checked the chars how you suggested to me but I can't see any non-ascii char, if I'm not wrong... Aug 11, 2015 at 13:26
  • may you look for and report here the processing log error message? in the code, before rising it, the exception message is wrote in the processing log. Aug 11, 2015 at 16:31
  • That exception happen where there is an algorithm exception (not related with GeoAlgorithm execution). I remember there where some report about failure of MakeValid in some record conditions.... btw, share the log message Aug 11, 2015 at 16:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.