Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte #481

Open
shenri52 opened this issue Mar 4, 2025 · 0 comments

Comments

@shenri52
Copy link

shenri52 commented Mar 4, 2025

Description du bug

Lorsque j'essaie d'importer les données dans ma base PostGre avec la nouvelle version, j'ai le message : UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte

Reproduire le bug

Etapes pour reproduire le bug

  1. Configuration des paramètres par défaut conserver
  2. Configuration de l'import

Image

Image

Log

INITIALISATION

  • Copie du répertoire C:\Users\henrisa\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\cadastre\scripts/plugin
    0 s
    STRUCTURATION BDD
    Création des tables
    Création des tables edigeo
    Ajout de la nomenclature
    1 s
    MAJIC
    Suppression des contraintes
    1 s
  • SUPPRESSION DES CONTRAINTES D'INTEGRITEES : DEBUT
    1 s
  • suppression clefs primaires
    1 s
    Suppression des indexes
    1 s
    Import des fichiers MAJIC

Recopier ci-dessous l'erreur Python de QGIS

Une erreur est survenue lors de l'exécution du code Python : 

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte 
Traceback (most recent call last):
  File "C:\Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\dialogs\import_dialog.py", line 326, in processImport
    qi.importMajic()
  File "C:\Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 433, in importMajic
    item['method']()
  File "C:\Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 679, in import_majic_into_database
    dep_dirs, majic_files_found = self.get_available_majic_files()
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 470, in get_available_majic_files
    for a in fin:
  File "", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte


Version de Python : 3.12.4 (main, Jun 10 2024, 12:48:35) [MSC v.1938 64 bit (AMD64)] 
Version de QGIS : 3.34.8-Prizren Prizren, 91642333 

Chemin Python :
C:/PROGRA~1/QGIS33~1.8/apps/qgis-ltr/./python
C:/Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS33~1.8/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS33~1.8\apps\grass\grass83\etc\python
C:\Users\Default\Documents
C:\Program Files\QGIS 3.34.8\bin\python312.zip
C:\PROGRA~1\QGIS33~1.8\apps\Python312\DLLs
C:\PROGRA~1\QGIS33~1.8\apps\Python312\Lib
C:\Program Files\QGIS 3.34.8\bin
C:\Users\henrisa\AppData\Roaming\Python\Python312\site-packages
C:\PROGRA~1\QGIS33~1.8\apps\Python312
C:\PROGRA~1\QGIS33~1.8\apps\Python312\Lib\site-packages
C:\PROGRA~1\QGIS33~1.8\apps\Python312\Lib\site-packages\win32
C:\PROGRA~1\QGIS33~1.8\apps\Python312\Lib\site-packages\win32\lib
C:\PROGRA~1\QGIS33~1.8\apps\Python312\Lib\site-packages\Pythonwin
C:/Users/henrisa/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Environnement

  • OS: Windows / Linux : Windows 11
  • Version de QGIS : 3.34.8
  • Version du plugin : 2.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant