<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><div dir="ltr">Il faut enlever )] à la fin de :</div><div dir="ltr"><br></div><div dir="ltr"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); white-space: pre-wrap; background-color: rgb(255, 255, 255);">callback=lambda: self.run("style_kid"))])</span></div><div dir="ltr"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></div><div dir="ltr"><font color="#000000"><span style="white-space: pre-wrap; -webkit-text-size-adjust: auto; background-color: rgb(255, 255, 255);">Et replacer par une virgule pour avoir </span></font></div><div dir="ltr"><font color="#000000"><span style="white-space: pre-wrap; -webkit-text-size-adjust: auto; background-color: rgb(255, 255, 255);"><br></span></font></div><div dir="ltr"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); white-space: pre-wrap; background-color: rgb(255, 255, 255);">callback=lambda: self.run("style_kid")),</span></div><div dir="ltr"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></div><div dir="ltr"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></div></div><div dir="ltr"><br><blockquote type="cite">Le 3 juil. 2021 à 14:46, Arnaud Champollion <achampollion@linux-alpes.org> a écrit :<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Bonjour,</p>
<p>J'ai mis à jour le style Caliec pour afficher la largeur des routes en mètres à l'échelle au lieu des unités de carte.</p>
<p>Commité.</p>
<p>J'ai créé ensuite le style Kid, avec son propre dossier, et j'ai joué à l'apprenti sorcier (mais je n'ai pas encore commité) en le déclarant dans orientation.py, ligne 175 :</p>
<p>
</p>
<p> my_menu = QMenu()
my_menu.addActions([self.add_action(icon_path=":/plugins/caliec/vignette_caliec", text=self.tr("Style CaLiÉc"), parent=my_menu,
add_to_toolbar=False, add_to_menu=False,
callback=lambda: self.run("style_caliec")),
self.add_action(icon_path=":/plugins/caliec/vignette_kid", text=self.tr("Style kid"), parent=my_menu,
add_to_toolbar=False, add_to_menu=False,
callback=lambda: self.run("style_kid"))])
self.add_action(icon_path=":/plugins/caliec/vignette_jardin", text=self.tr("Style jardin"), parent=my_menu,
add_to_toolbar=False, add_to_menu=False,
callback=lambda: self.run("style_jardin"))])</p>
<p>
</p>
<p>
</p>
<p>Pas de bol, ça ne fonctionne pas comme ça. À l'ouverture de QGIS j'ai maintenant :</p>
<p>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">Impossible de charger l'extension 'orientation_dev' provoque une erreur lors de l'appel à sa méthode classFactory()</span>
</p>
<h3 style=" margin-top:14px; margin-bottom:12px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:large; font-weight:600;">IndentationError:
unexpected indent </span></h3>
<pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'monospace';">Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 334, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/arnaud/.local/share/QGIS/QGIS3/profiles/default/python/plugins/orientation_dev/__init__.py", line 35, in classFactory
from .orientation import Orientation
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/arnaud/.local/share/QGIS/QGIS3/profiles/default/python/plugins/orientation_dev/orientation.py", line 182
self.add_action(icon_path=":/plugins/caliec/vignette_jardin", text=self.tr("Style jardin"), parent=my_menu,
^
IndentationError: unexpected indent
</span></pre>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-weight:600;">Version de Python :</span> 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0]
<span style=" font-weight:600;">Version de QGIS :</span> 3.10.4-A Coruña A Coruña, exported
</p>
<h4 style=" margin-top:12px; margin-bottom:12px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:medium; font-weight:600;">Chemin Python :</span></h4>
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px;
margin-right: 0px; -qt-list-indent: 1;">
<li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/share/qgis/python</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/home/arnaud/.local/share/QGIS/QGIS3/profiles/default/python</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/home/arnaud/.local/share/QGIS/QGIS3/profiles/default/python/plugins</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/share/qgis/python/plugins</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/lib/python38.zip</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/lib/python3.8</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/lib/python3.8/lib-dynload</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/home/arnaud/.local/lib/python3.8/site-packages</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/local/lib/python3.8/dist-packages</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/usr/lib/python3/dist-packages</li>
<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">/home/arnaud/.local/share/QGIS/QGIS3/profiles/default/python</li>
</ul>
<p></p>
<p>
</p>
<p>
</p>
<span>_______________________________________________</span><br><span>Caliec mailing list</span><br><span>Caliec@linux-alpes.org</span><br><span>https://ml.linux-alpes.org/cgi-bin/mailman/listinfo/caliec</span><br></div></blockquote></body></html>