-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
File path encoding in "delimitedtext"-Provider #19572
Comments
Author Name: Alexander Bruy (@alexbruy) Please be more specific, which "special" characters? Does it also failed when you load this file via QGIS GUI?
|
Author Name: l h_ (l h_) Special character could be an ä - any non english letter... |
Author Name: l h_ (l h_) It doesn't fail in the GUI... I think the URI-Constructor of the QgsVectorlayer isn't used there. Our plugin is also written in Python, maybe the problem is there? |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Minoru Akagi (@minorua) You need to convert unicode characters to ascii (URL encoding).
|
Author Name: Alexander Bruy (@alexbruy) This is not a QGIS bug, plugin should take care about handling non-ASCII characters. Please reopen if necessary
|
Author Name: Alexander Bruy (@alexbruy)
|
Author Name: l h_ (l h_)
Original Redmine Issue: 11274
Affected QGIS version: 2.4.0
Redmine category:data_provider/delimited_text_
Hello,
I have a problem with the path encoding of the "delimitedtext"-Provider - as soon as the file path has a special character the following error-message occurs:
"File cannot be opened or delimiter parameters are not valid"
Here is the code:
@uri = u"file:/" + unicode(fileName) + u"?delimiter={0}&xField={1}&yField={2}&crs=epsg:4326&spatialIndex=yes".format(",", "longitude", "latitude")
self.__csvLayer = QgsVectorLayer(uri, "my_csv_layer", "delimitedtext")@
The text was updated successfully, but these errors were encountered: