Skip to content
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

Unable to retrieve list of QgsActionScope from PyQGIS #29225

Closed
qgib opened this issue Feb 27, 2019 · 1 comment · Fixed by #35514
Closed

Unable to retrieve list of QgsActionScope from PyQGIS #29225

qgib opened this issue Feb 27, 2019 · 1 comment · Fixed by #35514
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API

Comments

@qgib
Copy link
Contributor

qgib commented Feb 27, 2019

Author Name: Thomas Gratier (@ThomasG77)
Original Redmine Issue: 21408
Affected QGIS version: 3.6.0
Redmine category:python_bindings_/_sipify


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

1. Return a QgsActionScopeRegistry
actionScopeRegistry = QgsApplication.actionScopeRegistry()

1. 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

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2019

Author Name: Giovanni Manghi (@gioman)


  • category_id was changed from PyQGIS Console to Python bindings / sipify

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API labels May 25, 2019
stev-0 added a commit to stev-0/QGIS that referenced this issue Apr 6, 2020
to allow use in actionScopeRegistry. Fixes qgis#29225
m-kuhn added a commit that referenced this issue Apr 8, 2020
Fix sip __hash__ for QgsActionScope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant