borysiasty / plugin_reloader

QGIS plugin: Reloads a chosen plugin in one click (only useful for Python Plugin Developers)
GNU General Public License v3.0
19 stars 16 forks source link

Reloading causes Processing to raise an Error #6

Closed borysiasty closed 1 month ago

borysiasty commented 8 years ago

Moved from http://hub.qgis.org/issues/10121 Bug report #10121, added by @Martin-Jung, 2014-04-26.

Hi,

I am not sure if this is a bug should be fixed within the Processing Toolbox or the PluginReloader plugin (which I just found and find highly useful).

Iam just developing a new Plugin for QGIS that adds several new functions for the Processing Toolbox. Unfortunately whenever I reload the plugin via the PluginReloader and try to open my new custom ProcessingFunctions it raises the following error (see attached Screenshot). The error disappears if I reload the Processing Providers. This can be done by simply open the Processing Options menu and closing it again. Maybe a small routine in the PluginReloader tool can be implemented that reloads all ProcessingProviders as well.

Tested on QGIS 2.2, Linux - Debian 64bit

screen

borysiasty commented 8 years ago

Discussion

@borysiasty wrote:

Could you please provide some steps (a sample change in the code) to reproduce this bug?

@Martin-Jung wrote:

Don't know what you mean with code samples, but here is how to reproduce with QGIS 2.2 stable (tested on Debian Jessie)

  1. Download for instance the Animove Plugin or LecoS plugin which has Processing features
  2. Enable the plugin and make sure it is visible and executable in the Processing Toolbox
  3. Select the Plugin in the PluginReloader for Reload
  4. Reload the plugin
  5. Now directly attempt to start the Plugin from the Processing Toolbox. Error shown in the screen- shot should occur.

@borysiasty wrote:

Now I see. Well, reloading Python modules gets complicated when it comes to horizontal dependencies.

In the plugin reloader I could either hardcode some pairs of dependencies (like LecoS->permaclim) or iterate over all plugins with the 'processing' tag, but it wold be only a tricky workaround. It still won't help at plugin upgrade.

To keep it simple and clear, I believe the full QGIS reload is the best solution for "normal" users. And you can just add utils.reloadPlugin('permaclim') to your copy of plugin reloader.

borysiasty commented 5 years ago

See also #20.

kobben commented 5 years ago

[copied here my comment from #20 because that was closed and found no way to re-open it:

Got the same problem of processing plugin not reloading. In a email conversation found that yquenach@itlink.fr concluded the problem apparently occurs if the plugin python file has the same name as its containing folder [which is normally the case, because that's the way that the Plugin Builder delivers its output. Tested and can confirm. If you eg rename the folder holding the processing plugin files from plugin_name to folder_plugin_name , the reloading works fine...

borysiasty commented 1 month ago

This particular problem seems to be no longer valid. Today's error should be fixed with 36537d3864261 (soon to be released)