error after upgrade
Closed this issue · 3 comments
Impossible de charger l'extension 'latlontools' provoque une erreur lors de l'appel à sa méthode classFactory()
SyntaxError: invalid syntax
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/alex/.local/share/QGIS/QGIS3/profiles/Alex/python/plugins/latlontools/init.py", line 2, in classFactory
from .latLonTools import LatLonTools
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/alex/.local/share/QGIS/QGIS3/profiles/Alex/python/plugins/latlontools/latLonTools.py", line 8, in
from .zoomToLatLon import ZoomToLatLon
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/alex/.local/share/QGIS/QGIS3/profiles/Alex/python/plugins/latlontools/zoomToLatLon.py", line 10, in
from .util import epsg4326, parseDMSString
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/alex/.local/share/QGIS/QGIS3/profiles/Alex/python/plugins/latlontools/util.py", line 36
s = f"{deg:.0f}\xB0{min:.0f}'{sec:.{prec}f}""
^
SyntaxError: invalid syntax
Version de Python : 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Version de QGIS : 3.4.4-Madeira Madeira, f6ddc62
I thought everyone was using at least Python 3.6. That syntax was introduced in 3.6. I guess I can go back and use the .format() syntax. I'm sure it will work with QGIS 3.6.x, but I will go back and redo the string formatting so that it will work with older versions of QGIS.
@alexmodesto73
I changed the Python 3.6 string formatting back to work with older versions of python. I pushed out a new Lat Lon Tools version 3.2.2. It should be available to you shortly. Let me know if you find any other problems.
it works !