Hi, iface is only accessible via QGIS console. It's not available within Jupyter. See the examples for standalone usage of PyQGIS to manipulate QGIS project, create an UI https://gist.github.com/ThomasG77/f711853e5fb81c746d2a1af0b2a9ecf5 and run some PyQGIS things within Jupyter https://gist.github.com/ThomasG77/223064813d8aefda5b3cdb05c2588fa1 Links more to help you getting started on a right track when doing standalone dev using PyQGIS.
Regards Thomas GRATIER Le mar. 5 déc. 2023 à 11:38, noshin prachi via QGIS-User < qgis-user@lists.osgeo.org> a écrit : > Dear all, > I am trying to create a map from qgis using jupyter. I have few layers > that need to be added to the map. I have tried to add iface by importing > iface from qgis.utils import iface, plugins . But I am getting the > following error. > [image: image.png] > > Please help me in this regard. > > Regards, > Noshin Saiyara > _______________________________________________ > QGIS-User mailing list > QGIS-User@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user