Bug report #18941

Can't edit GeoPackage using SQL through DBManager

Added by James Passmore over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.1(master) Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26773

Description

At work, using QGIS 3.0.1 on Windows, I can edit a GeoPackage created by QGIS by running SQL in DBManager, great!

However, at home using QGIS 3 master on Linux I can't.

I get Python error:

2018-05-12T06:44:10 WARNING Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 195, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 99, in init
self.btnCancel.setShortcut(QKeySequence.Cancel)
AttributeError: type object 'QKeySequence' has no attribute 'Cancel'

The GeoPackage was created in the Linux QGIS app, but when clicking on the SQL Window icon, I get the error above.


Related issues

Duplicated by QGIS Application - Bug report #19309: DB Manager exception on SQL Window open Closed 2018-06-29

History

#1 Updated by julie - over 2 years ago

Similar problem here, with QGIS 3.2 and Ubuntu 16.04 (xenial). When clicking on SQL Window icon, I get same error message :

File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 195, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 99, in init
self.btnCancel.setShortcut(QKeySequence.Cancel)
AttributeError: type object 'QKeySequence' has no attribute 'Cancel'

#2 Updated by Daniel Victoria over 2 years ago

I'm also having this issue. QGis v3.2.0-Bonn on Ubuntu 16.04 (xenial).

Loaded a shapefile in QGis and opened DB Manager. I can see the layer info, table and preview. But when I click on SQL Window, I get the same error reported by julie:

2018-07-05T16:13:20 WARNING Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 195, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 99, in __init__
self.btnCancel.setShortcut(QKeySequence.Cancel)
AttributeError: type object 'QKeySequence' has no attribute 'Cancel'

#3 Updated by Nyall Dawson over 2 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Already fixed in master /3.2.1

#4 Updated by Jürgen Fischer over 2 years ago

Also available in: Atom PDF