In a QGIS layers attribute form configuration I have the following Python Init Code Configuration:
Code in plain text:
# -*- coding: utf-8 -*-
from qgis.PyQt.QtWidgets import QWidget, QLineEdit
from qgis.PyQt.QtCore import Qt
def atlas_punkte_init_values(dialog, layer, feature):
#geom = feature.geometry()
control = dialog.findChild(QLineEdit, 'str')
print(control)
l = dialog.findChildren(QLabel)
print(l)
As one can see at first sight, this code is erroneous, because QLabel
is not imported. By means of this, I would expect an exception somewhat like ...NameError: name 'QLabel' is not defined
, but the only thing I get is this:
Because far trickier error constellations are imaginable than a forgotten import, debugging of more extensive scripts is nearly impossible that way.
First idea is to look at python errors in the log or the python console, but thats a fail.
Do I miss a location where qualified exceptions are thrown by these scripts or is there really no chance to properly debug these?