-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Loading a plugin that adds to the processing plugin does not work correctly #24148
Comments
Author Name: Ari Jolma (Ari Jolma) I forgot to mention that the plugin initially loads ok. This bug happens only when one unloads + loads the plugin, which I had to do to invoke the refreshing of the algorithm list. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Alexander Bruy (@alexbruy) Still true in latest master?
Traceback (most recent call last): File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 320, in addProvider providerItem = TreeProviderItem(provider_id, self.algorithmTree, self) File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 383, in __init__ self.populate() File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 395, in populate provider = algList.algs[self.provider_id] KeyError: 'perl' This is probably due to a bug in core/alglist.py, where the provider is added to processing registry before adding it to the algs hash, leading to a chicken-and-egg type of problem. The bug is not fatal since the plugin gets loaded and once it is activated in the processing options (a deactivate - activate cycle is needed), it is ok. In addition, I did not get the _loadAlgorithms method of the provider to execute via any other way than through an unload-load-deactivate-activate cycle. Traceback (most recent call last): File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 320, in addProvider providerItem = TreeProviderItem(provider_id, self.algorithmTree, self) File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 383, in __init__ self.populate() File "/home/ajolma/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 395, in populate provider = algList.algs[self.provider_id] KeyError: 'perl' This is probably due to a bug in core/alglist.py, where the provider is added to processing registry before adding it to the algs hash, leading to a chicken-and-egg type of problem. The bug is not fatal since the plugin gets loaded and once it is activated in the processing options (a deactivate - activate cycle is needed), it is ok. In addition, I did not get the _loadAlgorithms method of the provider to execute via any other way than through an unload-load-deactivate-activate cycle.
|
Author Name: Giovanni Manghi (@gioman) Closing for lack of feedback, please reopen if necessary.
|
Author Name: Arnaud Morvan (@arnaud-morvan) There is no more "algList" in source code, registry should be used everywhere now, so this should not append anymore. |
Author Name: Ari Jolma (Ari Jolma)
Original Redmine Issue: 16238
Affected QGIS version: master
Redmine category:processing/core
Assignee: Victor Olaya
Loading a plugin that adds to the processing plugin leads to a keyerror:
This is probably due to a bug in core/alglist.py, where the provider is added to processing registry before adding it to the algs hash, leading to a chicken-and-egg type of problem.
The bug is not fatal since the plugin gets loaded and once it is activated in the processing options (a deactivate - activate cycle is needed), it is ok.
In addition, I did not get the _loadAlgorithms method of the provider to execute via any other way than through an unload-load-deactivate-activate cycle.
The text was updated successfully, but these errors were encountered: