-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this commit, I get this error when trying to import data via 'cadastre' module in a PostGIS database :
It look like the use of the str function in the connector create this error.
Have you some solution to fix this ? Is it a configuration problem with my environment ?
I tried both on a Deian and Windows platform and each time with the 2.18 version of QGis I have this error.
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, yes, users with some accents in the attribute table may have some problems with this commit I think
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my knowledge, this addon doesn't generate tables with accent in their attributes.
Just add comments on columns with accents : https://github.com/3liz/QgisCadastrePlugin/blob/master/scripts/plugin/commun_create_metier.sql#L1142
Maybe this is the problem.
But I think it have to be solved since it's a regression.
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, the "cadastre" french plugin uses dbmanager tools to run queries. Il would have to adapt the code to be able to manage QGIS before and after this commit.
3liz/QgisCadastrePlugin#106
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems I can find a workaround by replacing in my code L 461 of cadastre_dialogs.py
c = connector._execute(None,unicode(sql))
by
c = connector._execute(None,unicode(sql).encode('utf-8'))
@jusabatier Please continue the issue conversation here for the cadastre plugin
3liz/QgisCadastrePlugin#106
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@strk could you take a look at https://issues.qgis.org/issues/16833 please?
What was wrong with the previous unicode()? Looks like a mistaken backport from master/Py3? :)
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert PR is in #4882
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting the commit triggers an infinite loop, see https://travis-ci.org/qgis/QGIS/jobs/255027295
14ab5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: infinite loop only occurs with python3, python2 is fine with the revert. We need a solution working for both.