[Qgis-user] Error installing qgis2leaf

gene martin.laloux at gmail.com
Sun Apr 27 02:26:27 PDT 2014


What version of Python are you using? 
If the version is < 2.7.x, look at    Mac OS X 10.6.8 QGIS not using
user-installed Python 2.7
<http://gis.stackexchange.com/questions/91832/mac-os-x-10-6-8-qgis-not-using-user-installed-python-2-7/92020#92020> 
, for example        

zero length field name in format  is not an error due to the QGIS version or
to a specific plugin but it is a general Python error:

If you try to load this plugin with a Python version < 2.7.x:

        File "..../.qgis2/python/plugins/qgis2leaf/qgis2leaf.py", line 42,
in __init__
    localePath = os.path.join(self.plugin_dir, 'i18n',
'qgis2leaf_{}.qm'.format(locale))
    ValueError: zero length field name in format

The cause of the error is the line 42 of qgis2leaf.py

In Python 2.7.x 

       localePath = os.path.join(self.plugin_dir, 'i18n',
'realcentroid_{}.qm'.format(locale))

becomes in Python < 2.7.x

       localePath = os.path.join(self.plugin_dir, 'i18n',
'realcentroid_{*0*}.qm'.format(locale))

So, it is very easy to correct this plugin  (I know, I know, some  will say
why not upgrade Python ?, but...)



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-installing-qgis2leaf-tp5137224p5137365.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.



More information about the Qgis-user mailing list