Closed ghtmtt closed 5 years ago
Hi, thanks for the report! Reloading Python modules is tricky and I haven't found any solution for Processing plugins yet. Maybe reloading the whole Processing is the way to go. I'll try to continue working on it next year, but don't expect any solution soon, please...
ok fine to hear that this problem is not related to my error ;)
thanks!
Hi Borys... just to put more entropy in the system.. some Processing plugins are correctly reloaded other not.
e.g. https://plugins.qgis.org/plugins/qproto/ (having it as a local git and also by downloading it) is not giving any problems, while creating a new Processing plugin from scratch gives the import error of above even if you don't touch the code
Good catch, thanks! I'll have to look at it deeper.
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 holdeing the processing plugin files from plugin_name to my_plugin_name , the reloading works fine...
Ah thanks! So the problem is deeper in the Python import system and not in the plugin reloader. You'll get the same error after upgrading the plugin or just disabling and enabling it back in the manager.
Ideally it should be fixed in QGIS core, but after some googling it doesn't looks trivial and personally I won't have time to investigate it further. So maybe it would be easier to change the Plugin Builder to name the module (file) differently from the package (directory). Would you mind to propose it to Gary in the https://github.com/g-sherman/Qgis-Plugin-Builder/issues ?
Steps to reproduce the error are just straightforward: just build a simple plugin with the plugin builder as processing provider plugin.
Then, reloading the plugin causes this weird error:
BTW: closing QGIS, changing something in the plugin and reopening QGIS is not giving any error.
Tested with QGIS master (3.5) on Debian Sid and last plugin reloader version 0.7.5