[Qgis-user] Error returned from Plugin giswater

Richard Duivenvoorde rdmailings at duif.net
Mon Mar 5 06:57:12 PST 2018


Hi Tyler,

I reckon this is not a public plugin?

But to my experience, and in my words: your plugin instance does not
have (and therefor KEEP) an handle to some object (QgsAttributeForm?)
which you try to retrieve.

Your python code tries to retrieve an (cpp) object, but the widget you
are referring to is not there (anymore in the cpp world, probably
garbage collected).
Note that all python references are actually references to cpp objects.
See
http://pyqt.sourceforge.net/Docs/PyQt5/gotchas.html#garbage-collection
for probably a better explanation :-)

Are you the author of the code? Then add a reference to it in your
plugin constructor: like:
self.attr_form = ...
This makes

Hope this helps,

Richard Duivenvoorde


On 05-03-18 15:18, Tyler Veinot wrote:
> Hi All;
> I am running a plugin called GISwater and it was working a few months
> ago but now I started getting an error. I posted the error with the
> giswater group but I think it might be something missing in my QGIS
> Environment so I thought I would send it out to the list in the hopes
> someone can explain it to me.
> 
> An error occurred during execution of following code:
> formOpen( _qgis_featureform_1_0,
> _qgis_layer_v_edit_man_source20161013122934199_0,
> _qgis_feature_20180305101453496)
> 
> 
> Traceback (most recent call last):
>   File "", line 1, in
>   File "", line 23, in formOpen
>   File "", line 44, in __init__
>   File "", line 73, in init_config_form
>   File
> "C:\Users\tveinot\.qgis2\python\plugins\giswater\utils_giswater.py",
> line 113, in getWidgetText
>     widget = _dialog.findChild(QWidget, widget)
> RuntimeError: wrapped C/C++ object of type QgsAttributeForm has been deleted
> 
> Python version:
> 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
> 
> QGIS version:
> 2.18.17 'Las Palmas', 98e769f70e
> 
> 
> Thanks;
> Tyler
> 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 




More information about the Qgis-user mailing list