<div dir="ltr"><div>Hello,</div><div><br></div><div>What is the proper way to access iface in a processing alg ?</div><div><br></div><div>I try "from qgis.utils import iface" but it crash when i make an iface.pushWarning.</div><div><br></div><div>Thanks,</div><div><br></div><div>Here is the stack trace : <br></div><div><br></div><div><br></div><div><br><br>*Crash ID*: 59968a8cbec4e3d98bbe532ada707149cd7f9eee<br><br><br>*Stack Trace*<br><pre><br>QgsCustomization::preNotify :<br>QObject::event :<br>QApplicationPrivate::notify_helper :<br>QApplication::notify :<br>QgsApplication::notify :<br>QCoreApplication::notifyInternal2 :<br>QCoreApplicationPrivate::sendPostedEvents :<br>qt_plugin_query_metadata :<br>QEventDispatcherWin32::processEvents :<br>CallWindowProcW :<br>DispatchMessageW :<br>QEventDispatcherWin32::processEvents :<br>qt_plugin_query_metadata :<br>QEventLoop::exec :<br>QDialog::exec :<br>PyCFunction_FastCallDict :<br>PyObject_GenericGetAttr :<br>PyEval_EvalFrameDefault :<br>PyFunction_FastCallDict :<br>PyObject_CallFunctionObjArgs :<br>PyObject_Call :<br>PyInit_QtCore :<br>PyInit_QtCore :<br>PyInit_QtCore :<br>PyInit_QtCore :<br>PyInit_QtCore :<br>QMetaObject::activate :<br>QAbstractItemView::doubleClicked :<br>QTreeView::mouseDoubleClickEvent :<br>QWidget::event :<br>QFrame::event :<br>QAbstractItemView::viewportEvent :<br>QCoreApplicationPrivate::sendThroughObjectEventFilters :<br>QApplicationPrivate::notify_helper :<br>QApplication::notify :<br>QgsApplication::notify :<br>QCoreApplication::notifyInternal2 :<br>QApplicationPrivate::sendMouseEvent :<br>QSizePolicy::QSizePolicy :<br>QSizePolicy::QSizePolicy :<br>QApplicationPrivate::notify_helper :<br>QApplication::notify :<br>QgsApplication::notify :<br>QCoreApplication::notifyInternal2 :<br>QGuiApplicationPrivate::processMouseEvent :<br>QWindowSystemInterface::sendWindowSystemEvents :<br>QEventDispatcherWin32::processEvents :<br>CallWindowProcW :<br>DispatchMessageW :<br>QEventDispatcherWin32::processEvents :<br>qt_plugin_query_metadata :<br>QEventLoop::exec :<br>QCoreApplication::exec :<br>main :<br>BaseThreadInitThunk :<br>RtlUserThreadStart :<br></pre><br><br><br>*QGIS Info*<br>QGIS Version: 3.2.0-Bonn<br>QGIS code revision: commit:bc43194061<br>Compiled against Qt: 5.9.2<br>Running against Qt: 5.9.2<br>Compiled against GDAL: 2.2.4<br>Running against GDAL: 2.2.4<br><br><br><br>*System Info*<br>CPU Type: x86_64<br>Kernel Type: winnt<br>Kernel Version: 10.0.17134<br><br></div></div>