[Qgis-user] Unicode Encounter Error when trying to join

Alister Hood alister.hood at synergine.com
Thu Aug 11 15:04:54 PDT 2011


Also note that there is "Vector->Data management tools->join
attributes", which I think is supposed to work the same way as the
mmqgis join tool (rather than a dynamic join, like in the vector
properties), and may not have this problem (please report if it does).

Alister

> Date: Thu, 11 Aug 2011 20:51:45 +0100
> From: Giovanni Manghi <giovanni.manghi at gmail.com>
> Subject: Re: [Qgis-user] Unicode Encounter Error when trying to join
> 	attributes using a text variable - how do I fix it?
> To: Megan Misovic <meganmisovic at gmail.com>
> Cc: qgis-user at lists.osgeo.org
> Message-ID: <1313092305.30051.1.camel at sibirica>
> Content-Type: text/plain; charset="UTF-8"
> 
> 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



More information about the Qgis-user mailing list