Bug report #15819
DB Manager SQL Window Not Launching
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | DB Manager | ||
Affected QGIS version: | 2.14.10 | Regression?: | No |
Operating System: | Linux | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23739 |
Description
With the Database Manager open, and when connected to a database (either PostGIS or Spatialite) the SQL Window (F2) cannot be launched. Nothing happens when you have a table or other object selected and you try to open the window. If you have the database itself selected, a Python error is thrown (pasted below). Another user posted the same problem on the listserv about a month ago:
http://osgeo-org.1560.x6.nabble.com/DB-Manager-SQL-window-does-not-open-td5289561.html
Similar to her, I'm running 2.14.5 Essen on a 64-bit Linux Mint 17.3 (Ubuntu 14.04 Trusty base) machine.
An error has occurred while executing Python code:
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 194, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 73, in init
self.editSql.setMarginVisible(True)
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2]
QGIS version: 2.14.5-Essen Essen, exported
Python Path:
/usr/share/qgis/python/plugins/processing
/usr/share/qgis/python
/home/USER/.qgis2/python
/home/USER/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
/home/USER/.qgis2//python
/usr/share/qgis/python/plugins/fTools/tools
History
#1 Updated by Giovanni Manghi almost 8 years ago
- Status changed from Open to Feedback
I cannot confirm on either Windows and Linux, using the latest available versions of LTR. Is this still true for you?
#2 Updated by Frank Donnelly almost 8 years ago
I just tried it again using 2.14.9 Essen on Linux - Linux Mint 17.3 (on Ubuntu 14.04 Trusty base) 64 bit - and I'm still getting the same Python error. I have also tried 2.14.9 on a 64-bit Windows 7 machine and did not get the error there.
#3 Updated by Giovanni Manghi almost 8 years ago
It works fine here on 2.18.2 on the same platform. Could you test with 2.18.2 and/or with the latest ltr (2.14.10)?
#4 Updated by Frank Donnelly almost 8 years ago
I just tried it again on the latest LTR - 2.14.10, on the same OS - Linux Mint 17.3 64 bit (on Ubuntu 14.04 Trusty base) and am still getting the same error - re-pasted below. I've also tried it on MS Windows and never had a problem - problem only seems to be on Linux.
I'll try 2.18 and see if it works - but I work in an academic environment and we only use the LTR versions there, and won't update until the next LTR comes out.
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 194, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 73, in init
self.editSql.setMarginVisible(True)
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Python version: 2.7.6 (default, Oct 26 2016, 20:33:43) [GCC 4.8.4]
QGIS version: 2.14.10-Essen Essen, exported
Python Path:
/usr/share/qgis/python/plugins/processing
/usr/share/qgis/python
/home/USER/.qgis2/python
/home/USER/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
/home/USER/.qgis2//python
/usr/share/qgis/python/plugins/fTools/tools
#5 Updated by Giovanni Manghi almost 8 years ago
Frank Donnelly wrote:
I just tried it again on the latest LTR - 2.14.10, on the same OS - Linux Mint 17.3 64 bit (on Ubuntu 14.04 Trusty base) and am still getting the same error - re-pasted below. I've also tried it on MS Windows and never had a problem - problem only seems to be on Linux.
Linux or just Linux Mint with a specific DE (Cinnamon? Mate? else?). Can you test (maybe in a VM) if the same happens on other distributions or DEs?
#6 Updated by amedeo fadini almost 8 years ago
Just happened in 2.14.10 LTR on Ubuntu 14.04 (osgeolive9.5 with updates). Until yesterday it worked fine. Something related apt-get upgrade.
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 194, in runSqlWindow
query = DlgSqlWindow(self.iface, db, self)
File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 73, in init
self.editSql.setMarginVisible(True)
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Versione Python: 2.7.6 (default, Oct 26 2016, 20:33:43) [GCC 4.8.4]
Versione di QGIS: 2.14.10-Essen Essen, exported
#7 Updated by Giovanni Manghi almost 8 years ago
- OS version deleted (
Mint 17.3) - Affected QGIS version changed from 2.14.5 to 2.14.10
- Priority changed from Normal to Severe/Regression
amedeo fadini wrote:
Just happened in 2.14.10 LTR on Ubuntu 14.04 (osgeolive9.5 with updates). Until yesterday it worked fine. Something related apt-get upgrade.
will give it a try then.
#8 Updated by amedeo fadini almost 8 years ago
Nope,
didn't found anything meaningful in apt-get and Synaptic history... (the upgrade was proposed by system)
I've got it working commenting line 73 in /usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py
#9 Updated by Giovanni Manghi over 7 years ago
I really cannot replicate (on the same Linux platforms) this issue, anyway the new LTR is due very soon, and 2.14.* is unlikely to get any fix.
Please test 2.18.4 and see if there you have the same problem or not. Thanks!
#10 Updated by Bernd Marcus over 7 years ago
I had the same error message by trying to call the sql-editor with all QGIS 2.14 versions. An upgrade to 2.18.4 solved the problem on openSuse 42.1
#11 Updated by Giovanni Manghi over 7 years ago
Bernd Marcus wrote:
I had the same error message by trying to call the sql-editor with all QGIS 2.14 versions. An upgrade to 2.18.4 solved the problem on openSuse 42.1
Good. As 2.18 will be the next release, and that is due pretty soon, I'm not really sure that 2.14 will receive any fix/backport in the future, so my gues is that this ticket should be closed.
#12 Updated by Frank Donnelly over 7 years ago
Thanks for investigating this. In my environment I have to stick with an LTR release so I'll wait for the big 3.0 to come out. My work-around has been to use the database GUI's (pgAdmin or Spatialite GUI) and create spatial views whenever I need to visualize a query in QGIS.
#13 Updated by Giovanni Manghi over 7 years ago
- Status changed from Feedback to Closed
- Resolution set to wontfix