[Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

Richard Duivenvoorde rdmailings at duif.net
Tue Jul 12 00:14:24 PDT 2016


On 12-07-16 03:01, Minoru Akagi wrote:
> Hi,
> 
> Just a quick note for python plugin devs.
> 
> I received an error report related to QGis.QGIS_VERSION constant [1].
> In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
> have been changed to unicode type. I guess that the change is
> necessary for unicode release name support.
> 
> With QGIS 2.16, encoding GIS_RELEASE_NAME/QGIS_VERSION with no
> explicit character code specified causes UnicodeEncodeError (try
> `str(QGis.QGIS_VERSION)`) and a few plugins seem to be affected (e.g.
> profiletool, numericalVertexEdit, etc).
> 
> [1] https://github.com/minorua/TileLayerPlugin/issues/20

Hi Minoru,

this is probably done to handle 'Nødebo' name for 2.16...

though you could say it is a api-change... I think easiest is to fix it
in plugins? Which (while Python2) should maybe move all str() calls to
unicode() ones?

Not sure there is an easier solution now after 2.16.0 ....?

Regards,

Richard





More information about the Qgis-developer mailing list