[Qgis-user] Accessing iface from jupyter

Thomas Gratier osgeo.mailinglist at gmail.com
Thu Dec 7 13:15:20 PST 2023


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 at 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 at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231207/0159b6e4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 21749 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231207/0159b6e4/attachment.png>


More information about the QGIS-User mailing list