Skip to content

Commit

Permalink
Import - MAJIC: correction bug d'encodage
Browse files Browse the repository at this point in the history
  • Loading branch information
mdouchin committed Oct 21, 2019
1 parent 3076760 commit 89b8e11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cadastre_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def importMajicIntoDatabase(self):
self.qc.updateLog(fpath)

# read file content
with open(fpath) as fin:
with open(fpath, encoding='ascii', errors='replace') as fin:
# Divide file into chuncks
for a in self.chunk(fin, self.maxInsertRows):
# Build sql INSERT query depending on database
Expand Down Expand Up @@ -1322,7 +1322,7 @@ def importEdigeoThfToDatabase(self, filename):
# qgis can connect to postgis DB without a specified host param connection, but ogr2ogr cannot
if not host:
host = "localhost"

pg_access = 'PG:host=%s port=%s dbname=%s active_schema=%s user=%s password=%s' % (
host,
port,
Expand Down

0 comments on commit 89b8e11

Please sign in to comment.