-
-
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
QGIS3 QtSqlDatabase 'QSPATIALITE' driver crash #25960
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Johannes Liem (Johannes Liem) Hello, I have the very same problem porting my plugin. Maybe the following helps somehow (not sure if is it appropriate to post here):
Running this code in the QGIS python console (3.0.2) results in a crash (it works in 2.18.19):
I am thinking about a work around using qgis.utils.spatialite_connect for all spatial queries (https://gis.stackexchange.com/questions/260527/how-to-create-a-spatialite-layer-in-qgis-3-with-python) and the 'QSQLITE' driver for non spatial queries to populate PyQt Views/Models/DataMappers (which in my case do not require spatial queries) |
Author Name: Jakub Kosik (@jakosek) I've done with same workaround as you thinking - works for now.
|
Author Name: Giovanni Manghi (@gioman) Johannes Liem wrote:
can the ticket issuer confirm? Thanks!
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Jakub Kosik (@jakosek)
Original Redmine Issue: 18064
Affected QGIS version: master
Redmine category:python_plugins
I'm trying to port my plugin to python3/Qt5/QGIS3. I'm using spatialite database with QtSqlDatabase to manage plugin requests:
@db = QSqlDatabase.addDatabase('QSPATIALITE')@
When I execute any QSqlQuery on that db - QGIS crashes. Tested with driver 'QSQLITE', no crash (and no spatial functions).
The text was updated successfully, but these errors were encountered: