[Qgis-user] Unicode Encounter Error when trying to join attributes using a text variable - how do I fix it?

Giovanni Manghi giovanni.manghi at gmail.com
Thu Aug 11 12:51:45 PDT 2011


It is probably a problem caused by a non ascii character in one of the
table of attributes, please report the problem to the author of the
plugin.

Meanwhile you may want to use the QGIS core join feature, you find it in
the vector properties (remember that in QGIS you can add also
geometryless tables in a project).

cheers


-- Giovanni --


On Thu, 2011-08-11 at 12:48 -0700, Megan Misovic wrote:
> Hello everyone,
>  
> I am trying to join an attribute table using a text column name. I am
> using Quantum GIS 1.7.0 and the mmqgis plugin .  I keep getting this
> error:
>  
> An error has occured while executing Python code:
> 
> Traceback (most recent call last):
>   File "C:/Users/rhs02/.qgis/python/plugins\mmqgis\mmqgis_dialogs.py",
> line 114, in run
>     mmqgis_attribute_join(self.iface, layername, infilename,
> joinfield, joinattribute, outfilename, notfoundname, addlayer)
>   File "C:/Users/rhs02/.qgis/python/plugins\mmqgis\mmqgis_library.py",
> line 189, in mmqgis_attribute_join
>     key = str(attributes[joinattribute_index].toString()).lower()
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
> position 5: ordinal not in range(128)
> 
> Python version:
> 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
> 
> 
> QGIS version:
> 1.7.0-Wroclaw Wroclaw, 63ecdd7
> 
> Python path: ['C:/PROGRA~1/QUANTU~1/apps/qgis/./python',
> 'C:/Users/rhs02/.qgis/python', 'C:/Users/rhs02/.qgis/python/plugins',
> 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins', 'C:\\PROGRA~1\
> \QUANTU~1\\bin\\python25.zip', 'C:\\PROGRA~1\\QUANTU~1\\apps\\Python25
> \\DLLs', 'C:\\PROGRA~1\\QUANTU~1\\apps\\Python25\\lib', 'C:\\PROGRA~1\
> \QUANTU~1\\apps\\Python25\\lib\\plat-win', 'C:\\PROGRA~1\\QUANTU~1\
> \apps\\Python25\\lib\\lib-tk', 'C:\\PROGRA~1\\QUANTU~1\\apps\\qgis\
> \bin', 'C:\\PROGRA~1\\QUANTU~1\\apps\\Python25', 'C:\\PROGRA~1\
> \QUANTU~1\\apps\\Python25\\lib\\site-packages', 'C:\\PROGRA~1\
> \QUANTU~1\\apps\\Python25\\lib\\site-packages\\win32', 'C:\\PROGRA~1\
> \QUANTU~1\\apps\\Python25\\lib\\site-packages\\win32\\lib', 'C:\
> \PROGRA~1\\QUANTU~1\\apps\\Python25\\lib\\site-packages\\Pythonwin',
> 'C:\\PROGRA~1\\QUANTU~1\\apps\\Python25\\lib\\site-packages\
> \wx-2.8-msw-unicode', 'C:\\PROGRA~1\\QUANTU~1\\apps\\qgis\\python\
> \plugins\\fTools\\tools', 'C:\\Users\\rhs02\\.qgis\\python\\plugins\
> \mmqgis/forms']
>  
> I tried reinstalling Quantum GIS and the plug in and I've made sure
> that the path to my shapefile don't contain any non-alphabetic
> characters.  I assume the path to my Quantum GIS program files also
> have no non-alphabetic characters.  I tried creating a C:tmp file
> because it fixed another problem with mmqgis - but to no avail. 
>  
> Does anyone know what might be going wrong?  I've made sure that the
> spelling of the text in the joining field is exactly the same -
> although there are some single quotes, forward slashes and question
> marks in my joining field. Is that what is causing this problem? I am
> using Windows Vista, if that makes a difference.
>  
> If you can't help me with this error - does anyone know another way of
> joining attributes using a text field in Quantum?
>  
> Thanks in advance for  any assistance,
>  
> Megan 
>  
>  
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user





More information about the Qgis-user mailing list