Bug report #18375

DB Manager Topoviewer cant load Postgis topology schema

Added by Antoine Rivière almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:3.0.0 Regression?:Yes
Operating System:Win 8 Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26265

Description

Steps to reproduce :
  1. Create postgis topology layers http://postgis.net/docs/Topology.html
  2. Open DB Manager and select postgis schema contening topology layers
  3. In "Schema" menu clic on "Topoviewer"
    Python error :
    
    AttributeError: 'QgsLayerTreeLayer' object has no attribute 'setVisible' 
    Traceback (most recent call last):
      File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_manager.py", line 227, in invoke_callback
        return self.invokeCallback(callback)
      File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_manager.py", line 297, in invokeCallback
        callback(self.tree.currentItem(), self.sender(), self, *params)
      File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugins\qgis_topoview\__init__.py", line 238, in run
        nodeLayer.setVisible(Qt.Unchecked)
    AttributeError: 'QgsLayerTreeLayer' object has no attribute 'setVisible'
    
    Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
    QGIS version: 3.0.0-Girona Girona, 001c80b0c3 
    
    Python Path:
    C:/Users/ariviere/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\extlibs
    C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python
    C:/Users/ariviere/AppData/Roaming/QGIS/QGIS3\profiles\default/python
    C:/Users/ariviere/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
    C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins
    C:\Program Files\QGIS 3.0\bin\python36.zip
    C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs
    C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib
    C:\Program Files\QGIS 3.0\bin
    C:\PROGRA~1\QGIS3~1.0\apps\Python36
    C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages
    C:/Users/ariviere/AppData/Roaming/QGIS/QGIS3\profiles\default/python
    C:/Users/ariviere/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2mapillary
    C:\Users\ariviere\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\go2mapillary\extlibs
    

It works on QGIS 2.18

Associated revisions

Revision 29f6884a
Added by Salvatore Larosa almost 7 years ago

Fixes #18375 - fix API break

Revision 8bd39fb3
Added by Salvatore Larosa almost 7 years ago

Fixes #18375 - fix API break

cherry-picked from 29f6884a23c31357db30575437951278ad2d8f9c

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Priority changed from Normal to High

#2 Updated by Salvatore Larosa almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF