[QGIS-Developer] QGIS error when connected to signal newProjectCreated

Richard Duivenvoorde rdmailings at duif.net
Fri Oct 13 02:24:26 PDT 2017


Can you show some more code, and in what version of QGIS?

If I run the following in the python console (2.18.13 and master), it
just works?:

def test():
    print('yes')

iface.newProjectCreated.connect(test)

Regards,

Richard Duivenvoorde


On 13-10-17 11:12, Stefan Keller wrote:
> This message was sent by Martin Boos (but seems to have been rejected
> currently):
> 
> Hi devs
> 
> I’m trying to handle the signal ‘newProjectCreated’ in my python
> plugin. Unfortunately, every time this event occurs, a python error is
> thrown:
> 
> Traceback (most recent call last):
> File "C:/Users/Martin/.qgis2/python/plugins\Vector-Tiles-Reader-QGIS-Plugin\vtr_plugin.py",
> line 88, in _on_new_qgis_project_created
> pass
> TypeError: 'NoneType' object is not callable
> 
> Funny thing is, this happens even if my handler is empty:
> 
>     def _on_new_qgis_project_created(self):
>         pass
> 
> 
> Any ideas how to solve this?
> 
> Thanks and best regards
> Martin
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 



More information about the QGIS-Developer mailing list