[Qgis-developer] OpenLayers plugin

Borys Jurgiel borysiasty at aster.pl
Tue Jun 8 05:04:15 EDT 2010


Hi, after today's upgrade I started to get such error:

  File "/home/borys/.qgis/python/plugins/openlayers/openlayers_plugin.py", 
line 72, in initGui
    print "Spherical Mercator coordinate reference system is:\n  %s\n  EPSG:
%d\n  SRS ID = %d" % (crs.description(), crs.epsg(), crs.srsid())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 
71: ordinal not in range(128)

It's because the CRS description is translateable and can contain non-ascii 
characters.

I see three problems here:

1) The conversion to unicode of course. 

2) I'd suggest to comment any "prints" when releasing plugins, because it make 
a little mess in the console you call qgis from :)

3) The plugin always creates a "Generated CRS...blahblah", what's a bit 
irritating, as there are already at least three Google Mercators in qgis 1.5 
standard database (epsg:900913, epsg:3857, osgeo:41001). Could it add the 
custom CRS only if necessary?


More information about the Qgis-developer mailing list