3liz / QgisCadastrePlugin

A QGIS plugin which helps users to import the french land registry ('cadastre') data into a database. It is meant to ease the use of the data in QGIS by providing search tools and appropriate layer symbology.
GNU General Public License v2.0
60 stars 41 forks source link

Erreur à l'import des fichiers EDIGEO #309

Open smoliv opened 2 years ago

smoliv commented 2 years ago

Bonjour, lors du chargement des données EDIGEO et Majic il se produit une erreur à l'étape di'mport des fichiers EDIGEO dans la base postgis. Plus précisément à l'instruction "Imports des fichiers via ogr2ogr"

Et voici le log :

AttributeError: 'DataSource' object has no attribute 'delete' 
Traceback (most recent call last):
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_dialogs.py", line 762, in processImport
    qi.importEdigeo()
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 667, in importEdigeo
    self.importAllEdigeoToDatabase()
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 1246, in importAllEdigeoToDatabase
    self.importEdigeoThfToDatabase(thf)
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\cadastre_import.py", line 1371, in importEdigeoThfToDatabase
    self.go = ogr2ogr(cmdArgs)
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\scripts\pyogr\ogr2ogr.py", line 576, in main
    nCoordDim)
  File "C:/Users/016741/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\cadastre\scripts\pyogr\ogr2ogr.py", line 675, in ogr2ogr
    poODS.delete()
AttributeError: 'DataSource' object has no attribute 'delete'

Version de Python : 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
Version de QGIS : 3.16.7-Hannover Hannover, 0471743889 

Je travaille sous Windows et la version du plugin est la dernière 1.12.1

D'avance merci pour votre aide. Cdlt

REIMSMetropole commented 2 years ago

Aloha

En complément : nous avons nous aussi rencontré des erreurs dans l'import des données EDIGEO :

L'import ayant fonctionné dans notre base d'intégration (pourquoi, nous l'ignorons), nous avons procédé à un dump puis importé le dump en prod.


...suppression clefs primaires 
1739 s 
* Import des fichiers EDIGEO dans la base 
- Import des fichiers via ogr2ogr 
Erreur - L'import des données via OGR2OGR a échoué: FAILURE: Unable to open datasource `C:\Users\XXXX\AppData\Local\Temp\cad_edigeo_plain_0od1k_n0\tar_1216\E000ZP01.THF' with the following drivers. -> JP2ECW -> OCI -> SOSI -> PCIDSK -> netCDF -> PDS4 -> VICAR -> JP2OpenJPEG -> PDF -> MBTiles -> EEDA -> DB2ODBC -> ESRI Shapefile -> MapInfo File -> UK .NTF -> OGR_SDTS -> S57 -> DGN -> OGR_VRT -> REC -> Memory -> BNA -> CSV -> NAS -> GML -> GPX -> LIBKML -> KML -> GeoJSON -> GeoJSONSeq -> ESRIJSON -> TopoJSON -> Interlis 1 -> Interlis 2 -> OGR_GMT -> GPKG -> SQLite -> ODBC -> WAsP -> PGeo -> MSSQLSpatial -> OGR_OGDI -> PostgreSQL -> MySQL -> OpenFileGDB -> XPlane -> DXF -> CAD -> FlatGeobuf -> Geoconcept -> GeoRSS -> GPSTrackMaker -> VFK -> PGDUMP -> OSM -> GPSBabel -> SUA -> OpenAir -> OGR_PDS -> WFS -> OAPIF -> HTF -> AeronavFAA -> Geomedia -> EDIGEO -> SVG -> CouchDB -> Cloudant -> Idrisi -> ARCGEN -> SEGUKOOA -> SEGY -> XLS -> ODS -> XLSX -> Elasticsearch -> Walk -> Carto -> AmigoCloud -> SXF -> Selafin -> JML -> PLSCENES -> CSW -> VDV -> GMLAS -> MVT -> NGW -> MapML -> TIGER -> AVCBin -> AVCE00 -> HTTP ['', '-s_srs', 'EPSG:2154', '-a_srs', 'EPSG:2154', '-append', '-f', 'PostgreSQL', 'PG:service=sig active_schema=cadastre_import', 'C:\\Users\\ELODIE~1.MON\\AppData\\Local\\Temp\\cad_edigeo_plain_0od1k_n0\\tar_1216\\E000ZP01.THF', '-lco', 'GEOMETRY_NAME=geom', '-lco', 'PG_USE_COPY=YES', '-nlt', 'GEOMETRY', '-gt', '50000', '--config', 'OGR_EDIGEO_CREATE_LABEL_LAYERS', 'NO'] 
FINALISATION
Erreur lors de la suppression des répertoires temporaires: [WinError 2] Le fichier spécifié est introuvable: 'C:\\Users\\XXXX\\AppData\\Local\\Temp\\cad_edigeo_plain_0od1k_n0\\tar_5\\EDZC01SE.GEO' `