#1 Tue 02 December 2025 13:02
- pyjoubert
- Participant assidu
- Lieu: Lyon
- Date d'inscription: 21 Mar 2006
- Messages: 388
QGIS 3.34: Plugin de gestion forestiere
Bonjour,
Nous venons de télécharger le plugin de gestion forestière édité par Marc Grosjean.
L' plugin ne s'installe pas et généré une erreur à l'installation
Code:
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'
Traceback (most recent call last):
File "C:\PROGRA~1/QGIS3/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:\Users/SITPYJO/AppData/Roaming/QGIS/QGIS3\profiles\dryade/python/plugins\gestion_forestiere\__init__.py", line 35, in classFactory
from .gestion_forestiere import CoordClick
File "C:\PROGRA~1/QGIS3/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/SITPYJO/AppData/Roaming/QGIS/QGIS3\profiles\dryade/python/plugins\gestion_forestiere\gestion_forestiere.py", line 99, in
from .utils import (
File "C:\PROGRA~1/QGIS3/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/SITPYJO/AppData/Roaming/QGIS/QGIS3\profiles\dryade/python/plugins\gestion_forestiere\utils.py", line 326, in
def extraire_section_numero(id_val: str, code_pays: str) -> tuple[str, str] | tuple[None, None]:
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'Avez-vous déjà été confonter à ce problème ?
Merci et bonne journée, PYJ
Hors ligne
#2 Tue 02 December 2025 13:34
- ondeos
- Participant occasionnel
- Date d'inscription: 31 Mar 2011
- Messages: 43
Re: QGIS 3.34: Plugin de gestion forestiere
erreur car c'est du python 3.10 et qgis-ltr utilise du 3.9 . il faut modifier utils.py
donc ajouter en haut du fichier( si ce n'est pas le cas) from typing import Tuple, Optional
et remplacer : def extraire_section_numero(id_val: str, code_pays: str) -> tuple[str, str] | tuple[None, None]:
Par : def extraire_section_numero(id_val: str, code_pays: str) -> Tuple[Optional[str], Optional[str]]:
Hors ligne
#3 Tue 02 December 2025 13:57
- pyjoubert
- Participant assidu
- Lieu: Lyon
- Date d'inscription: 21 Mar 2006
- Messages: 388
Re: QGIS 3.34: Plugin de gestion forestiere
En effet ca va plus loin
Merci
PYJ
Hors ligne


