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

Invalid SQL error when using dataProvider().changeAttributeValues() #22432

Closed
qgib opened this issue Mar 10, 2016 · 2 comments
Closed

Invalid SQL error when using dataProvider().changeAttributeValues() #22432

qgib opened this issue Mar 10, 2016 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@qgib
Copy link
Contributor

qgib commented Mar 10, 2016

Author Name: Daan Goedkoop (@dgoedkoop)
Original Redmine Issue: 14454
Affected QGIS version: 2.14.0
Redmine category:data_provider/spatialite


I have a script that updates values in a Spatialite layer. It basically works like this:

idValue1 = spatialite_layer.dataProvider().fields().indexFromName( 'Value1' )
idValue2 = spatialite_layer.dataProvider().fields().indexFromName( 'Value2' )

updateMap = {}
for feat in selfeats:
  value1 = ...
  value2 = ...
  updateMap[ feat.id() ] = { idValue1 : value1, idValue2 : value2 }

spatialite_layer.dataProvider().changeAttributeValues( updateMap )

In QGIS 2.12 the script works fine. In version 2.14 I get this error:

@qgib
Copy link
Contributor Author

qgib commented Mar 10, 2016

Author Name: Nyall Dawson (@nyalldawson)


Can you test with master? There's been a possibly related fix for this recently.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 14, 2016

Author Name: Daan Goedkoop (@dgoedkoop)


Yes, it looks like it has been fixed in master.


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant