[QGIS-Developer] plugin reload fail

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[QGIS-Developer] plugin reload fail

Pierluigi De Rosa-4
Dear all,

I have a simple problem.
I'm porting the opeNoise plugin [1] to 3.x
I'm not the author plugin but I'm experiencing that the plugin reload fails. It tels me that the plugin have been reloaded but the changes are non applied. Even if I deactivate and than activate the plugin the same results (no changes detected).
The only way is to restart the software any time losing too much time.

Can someone help me please?
thanks
Pierluigi


--
-- 




Ing. Pierluigi De Rosa
PhD in Scienze della terra
Professore a contratto di G.I.S. presso Università di Perugia

Studio Associato GFOSSERVICES
               
Presso CAMPUS Via F.lli Cairoli 24 - 06127 Perugia (PG)
fax: 075 7823038
cel: 3497558268
webwww.gfosservices.it
skype: pierluigi.derosa


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: plugin reload fail

Richard Duivenvoorde
On 10/12/2018 06:20 PM, Ing. Pierluigi De Rosa wrote:
> Dear all,
>
> I have a simple problem.
> I'm porting the opeNoise plugin [1] to 3.x
> I'm not the author plugin but I'm experiencing that the plugin reload
> fails. It tels me that the plugin have been reloaded but the changes are
> non applied. Even if I deactivate and than activate the plugin the same
> results (no changes detected).
> The only way is to restart the software any time losing too much time.

How sure are you that it is not reloaded?
Can you check by writing some message with a version number?

Normally writing the

__init__
initGui
unload

should be enough. Only thing I could think off is that you do not
disconnect the QActions (though I'm not even sure if that is really needed).

Also note that if you reload your plugin AFTER an exception, often you
end up with a situation where QGIS still has (parts) of the plugin in
memory while also loading a new version of your plugin, so sometimes
showing 2 versions of your pluginbutton/toolbar etc. I think only a QGIS
restart works then.

Another think I've had is that mixing up an already installed version
with the one I'm developing (because the symbolic link was gone, or I
was actually working in another profile then I thought or.... other
silly things)

Regards,

Richard
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: plugin reload fail

DelazJ
Hi,

How about reloading with the "Plugin reloader" plugin [0]? You might need to enable "show experimental plugins" beforehand.
I thik this would save QGIS I/O.


Regards,
Harrissou

Le sam. 13 oct. 2018 à 10:14, Richard Duivenvoorde <[hidden email]> a écrit :
On 10/12/2018 06:20 PM, Ing. Pierluigi De Rosa wrote:
> Dear all,
>
> I have a simple problem.
> I'm porting the opeNoise plugin [1] to 3.x
> I'm not the author plugin but I'm experiencing that the plugin reload
> fails. It tels me that the plugin have been reloaded but the changes are
> non applied. Even if I deactivate and than activate the plugin the same
> results (no changes detected).
> The only way is to restart the software any time losing too much time.

How sure are you that it is not reloaded?
Can you check by writing some message with a version number?

Normally writing the

__init__
initGui
unload

should be enough. Only thing I could think off is that you do not
disconnect the QActions (though I'm not even sure if that is really needed).

Also note that if you reload your plugin AFTER an exception, often you
end up with a situation where QGIS still has (parts) of the plugin in
memory while also loading a new version of your plugin, so sometimes
showing 2 versions of your pluginbutton/toolbar etc. I think only a QGIS
restart works then.

Another think I've had is that mixing up an already installed version
with the one I'm developing (because the symbolic link was gone, or I
was actually working in another profile then I thought or.... other
silly things)

Regards,

Richard
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: plugin reload fail

Borys Jurgiel-4
Hi,

It's not so straightforward to recursively reload complex plugins, thus both
Plugin Manager and Plugin Reloader have a long-standing problem with reloading
modules placed in subdirectories. This is the case of opeNoise, where most of
the code is in the 'tools' subdirectory, so all changes there require QGIS to
be restarted.

I've just released Plugin Reloader 0.7.5 that hopefully fixes this issue
finally. Could you please test if it helps with opeNoise? If so, I'll apply
the same to the Manager or even qgis.utils.

Unfortunately it's only for QGIS 3, as I didn't success to make it working
with Python 2 (and the old opeNoise).

Best regards,
Borys


Dnia sobota, 13 października 2018 12:15:28 CEST DelazJ pisze:

> Hi,
>
> How about reloading with the "Plugin reloader" plugin [0]? You might need
> to enable "show experimental plugins" beforehand.
> I thik this would save QGIS I/O.
>
> [0] http://plugins.qgis.org/plugins/plugin_reloader/
>
> Regards,
> Harrissou
>
> Le sam. 13 oct. 2018 à 10:14, Richard Duivenvoorde <[hidden email]> a
>
> écrit :
> > On 10/12/2018 06:20 PM, Ing. Pierluigi De Rosa wrote:
> > > Dear all,
> > >
> > > I have a simple problem.
> > > I'm porting the opeNoise plugin [1] to 3.x
> > > I'm not the author plugin but I'm experiencing that the plugin reload
> > > fails. It tels me that the plugin have been reloaded but the changes are
> > > non applied. Even if I deactivate and than activate the plugin the same
> > > results (no changes detected).
> > > The only way is to restart the software any time losing too much time.
> >
> > How sure are you that it is not reloaded?
> > Can you check by writing some message with a version number?
> >
> > Normally writing the
> >
> > __init__
> > initGui
> > unload
> >
> > should be enough. Only thing I could think off is that you do not
> > disconnect the QActions (though I'm not even sure if that is really
> > needed).
> >
> > Also note that if you reload your plugin AFTER an exception, often you
> > end up with a situation where QGIS still has (parts) of the plugin in
> > memory while also loading a new version of your plugin, so sometimes
> > showing 2 versions of your pluginbutton/toolbar etc. I think only a QGIS
> > restart works then.
> >
> > Another think I've had is that mixing up an already installed version
> > with the one I'm developing (because the symbolic link was gone, or I
> > was actually working in another profile then I thought or.... other
> > silly things)
> >
> > Regards,
> >
> > Richard
> > _______________________________________________
> > QGIS-Developer mailing list
> > [hidden email]
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: plugin reload fail

Pierluigi De Rosa-4
Dear Borys,

I update the plugin reloader to the version 0.7.5 and I tried to use it on openoise but it still fails.
No changes are detected.

I'm using QGIS 3.2 and a ported version of openoise (not the official one that is for qgis 2.x)

Thanks
Pierluigi


Da: "Borys Jurgiel" <[hidden email]>
A: [hidden email]
Cc: "Richard Duivenvoorde" <[hidden email]>
Inviato: Sabato, 13 ottobre 2018 23:33:59
Oggetto: Re: [QGIS-Developer] plugin reload fail

Hi,

It's not so straightforward to recursively reload complex plugins, thus both
Plugin Manager and Plugin Reloader have a long-standing problem with reloading
modules placed in subdirectories. This is the case of opeNoise, where most of
the code is in the 'tools' subdirectory, so all changes there require QGIS to
be restarted.

I've just released Plugin Reloader 0.7.5 that hopefully fixes this issue
finally. Could you please test if it helps with opeNoise? If so, I'll apply
the same to the Manager or even qgis.utils.

Unfortunately it's only for QGIS 3, as I didn't success to make it working
with Python 2 (and the old opeNoise).

Best regards,
Borys


Dnia sobota, 13 października 2018 12:15:28 CEST DelazJ pisze:

> Hi,
>
> How about reloading with the "Plugin reloader" plugin [0]? You might need
> to enable "show experimental plugins" beforehand.
> I thik this would save QGIS I/O.
>
> [0] http://plugins.qgis.org/plugins/plugin_reloader/
>
> Regards,
> Harrissou
>
> Le sam. 13 oct. 2018 à 10:14, Richard Duivenvoorde <[hidden email]> a
>
> écrit :
> > On 10/12/2018 06:20 PM, Ing. Pierluigi De Rosa wrote:
> > > Dear all,
> > >
> > > I have a simple problem.
> > > I'm porting the opeNoise plugin [1] to 3.x
> > > I'm not the author plugin but I'm experiencing that the plugin reload
> > > fails. It tels me that the plugin have been reloaded but the changes are
> > > non applied. Even if I deactivate and than activate the plugin the same
> > > results (no changes detected).
> > > The only way is to restart the software any time losing too much time.
> >
> > How sure are you that it is not reloaded?
> > Can you check by writing some message with a version number?
> >
> > Normally writing the
> >
> > __init__
> > initGui
> > unload
> >
> > should be enough. Only thing I could think off is that you do not
> > disconnect the QActions (though I'm not even sure if that is really
> > needed).
> >
> > Also note that if you reload your plugin AFTER an exception, often you
> > end up with a situation where QGIS still has (parts) of the plugin in
> > memory while also loading a new version of your plugin, so sometimes
> > showing 2 versions of your pluginbutton/toolbar etc. I think only a QGIS
> > restart works then.
> >
> > Another think I've had is that mixing up an already installed version
> > with the one I'm developing (because the symbolic link was gone, or I
> > was actually working in another profile then I thought or.... other
> > silly things)
> >
> > Regards,
> >
> > Richard
> > _______________________________________________
> > QGIS-Developer mailing list
> > [hidden email]
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: plugin reload fail

Borys Jurgiel-4
Apparently my recent fix [1] wasn't enough and some modules are still not
unloaded. Unfortunately I won't be able to work on it soon :(

As a workaround, maybe you can optimize the way you reload the whole QGIS? For
example run QGIS in a loop (so you only need to press Ctrl-Q to reload),
create a dedicated user profile (not burdened with other plugins), configure
the startup project (with a test data), temporarily trigger one of the plugin
actions in initGui (so the dialog you're currently working on opens
automatically after reload).

Regards,
Borys

[1] https://github.com/borysiasty/plugin_reloader/commit/64ccae09


Dnia poniedziałek, 15 października 2018 10:08:13 CEST Pierluigi De Rosa pisze:

> Dear Borys,
>
>
> I update the plugin reloader to the version 0.7.5 and I tried to use it on
> openoise but it still fails. No changes are detected.
>
>
> I'm using QGIS 3.2 and a ported version of openoise (not the official one
> that is for qgis 2.x)
>
>
> Thanks
> Pierluigi
>
> ----- Messaggio originale -----
>
> Da: "Borys Jurgiel" <[hidden email]>
> A: [hidden email]
> Cc: "Richard Duivenvoorde" <[hidden email]>
> Inviato: Sabato, 13 ottobre 2018 23:33:59
> Oggetto: Re: [QGIS-Developer] plugin reload fail
>
> Hi,
>
> It's not so straightforward to recursively reload complex plugins, thus both
> Plugin Manager and Plugin Reloader have a long-standing problem with
> reloading modules placed in subdirectories. This is the case of opeNoise,
> where most of the code is in the 'tools' subdirectory, so all changes there
> require QGIS to be restarted.
>
> I've just released Plugin Reloader 0.7.5 that hopefully fixes this issue
> finally. Could you please test if it helps with opeNoise? If so, I'll apply
> the same to the Manager or even qgis.utils.
>
> Unfortunately it's only for QGIS 3, as I didn't success to make it working
> with Python 2 (and the old opeNoise).
>
> Best regards,
> Borys
>
> Dnia sobota, 13 października 2018 12:15:28 CEST DelazJ pisze:
> > Hi,
> >
> > How about reloading with the "Plugin reloader" plugin [0]? You might need
> > to enable "show experimental plugins" beforehand.
> > I thik this would save QGIS I/O.
> >
> > [0] http://plugins.qgis.org/plugins/plugin_reloader/
> >
> > Regards,
> > Harrissou
> >
> > Le sam. 13 oct. 2018 à 10:14, Richard Duivenvoorde <[hidden email]> a
> >
> > écrit :
> > > On 10/12/2018 06:20 PM, Ing. Pierluigi De Rosa wrote:
> > > > Dear all,
> > > >
> > > > I have a simple problem.
> > > > I'm porting the opeNoise plugin [1] to 3.x
> > > > I'm not the author plugin but I'm experiencing that the plugin reload
> > > > fails. It tels me that the plugin have been reloaded but the changes
> > > > are
> > > > non applied. Even if I deactivate and than activate the plugin the
> > > > same
> > > > results (no changes detected).
> > > > The only way is to restart the software any time losing too much time.
> > >
> > > How sure are you that it is not reloaded?
> > > Can you check by writing some message with a version number?
> > >
> > > Normally writing the
> > >
> > > __init__
> > > initGui
> > > unload
> > >
> > > should be enough. Only thing I could think off is that you do not
> > > disconnect the QActions (though I'm not even sure if that is really
> > > needed).
> > >
> > > Also note that if you reload your plugin AFTER an exception, often you
> > > end up with a situation where QGIS still has (parts) of the plugin in
> > > memory while also loading a new version of your plugin, so sometimes
> > > showing 2 versions of your pluginbutton/toolbar etc. I think only a QGIS
> > > restart works then.
> > >
> > > Another think I've had is that mixing up an already installed version
> > > with the one I'm developing (because the symbolic link was gone, or I
> > > was actually working in another profile then I thought or.... other
> > > silly things)
> > >
> > > Regards,
> > >
> > > Richard
> > > _______________________________________________
> > > QGIS-Developer mailing list
> > > [hidden email]
> > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer