[QGIS-Developer] Plugin using Pythonnet fails to start during installation

Lars I. Nielsen lin at LIFA.DK
Tue Apr 9 01:49:47 PDT 2024


Hi developers.

We've developed a QGIS plugin, that utilizes Pythonnet to communicate with C# on Windows.

Pythonnet is not part of the chosen distribution for Python in QGIS (as of 3.34), so we do a separate installation of this module into %APPDATA%/Python, which is used by all Python distributions on the PC.

But even after Pythonnet has been installed correctly, we get an error when the QGIS plugin installer tries to start the plugin.

[cid:image001.png at 01DA8A6B.9CAF2A30]

However, the plugin has been installed correctly, and it starts just fine when one manually activates it in the plugin window list.


Why can't the plugin start when activated by the QGIS plugin installer ?
Is it running in some kind of restricted environment, that excludes use of the APPDATA location ?

Cheers.


Ps!
We are aware of different versions of Pythonnet in Python 3.7 vs 3.9. We install both.



Med venlig hilsen

Lars I. Nielsen
GIS-kons., FME+Python Certified Professional
GeoData

[cid:image002.png at 01DA8A6B.9CAF2A30]


Dir.
+4563136849<tel:+4563136849>
Tlf.
+4563136800<tel:+4563136800>
Mail
+lin at lifa.dk<mailto:lin at lifa.dk>




LIFA A/S · Tlf +4563136800<tel:+4563136800> · lifa.dk<https://www.lifa.dk/> · CVR 20937289
Odense · Fredericia · Glostrup · Hillerød · Kerteminde · Kolding · Middelfart · Vejle · Vissenbjerg · Aarhus
[cid:image003.png at 01DA8A6B.9CAF2A30]<https://www.linkedin.com/company/lifa-a-s/>
Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240409/96e60a8d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 15139 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240409/96e60a8d/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 4096 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240409/96e60a8d/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2048 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240409/96e60a8d/attachment-0005.png>


More information about the QGIS-Developer mailing list