Bug report #21408

Unable to retrieve list of QgsActionScope from PyQGIS

Added by Thomas Gratier over 1 year ago. Updated over 1 year ago.

Status:Open
Priority:Normal
Assignee:-
Category:Python bindings / sipify
Affected QGIS version:3.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29225

Description

I open the Python console in QGIS 3.6 with revision code 5873452 (on Ubuntu 18.04 64 bits) from the official package
and execute the following:

from qgis.core import QgsApplication

# Return a QgsActionScopeRegistry
actionScopeRegistry = QgsApplication.actionScopeRegistry()

# Gets all registered action scopes
actionScopeRegistry.actionScopes()

The last line code throws the following error:

TypeError: unhashable type: 'QgsActionScope'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/code.py", line 91, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
SystemError: <class 'qgis._core.QgsActionScope'> returned a result with an error set

History

#1 Updated by Giovanni Manghi over 1 year ago

  • Category changed from PyQGIS Console to Python bindings / sipify

Also available in: Atom PDF