[QGIS-Developer] PyQgis Standalone app from 3.4 to 3.16

PIERRE Sylvain sylvain.pierre at alsace.eu
Mon Oct 3 06:04:09 PDT 2022


Hi devs,

I'm porting a PyQgis standalone app from 3.4 to 3.16 api.
I get an error with the new 3.16 app
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: <nothing>

The most visible change I noticed is python 3.7 to 3.9. Is there any impact on PyQt5 bindings ?  With python 3.7 there was a C:\Program Files\QGIS 3.4\apps\Python37\sip directory which is missing with python 3.9.

Here is my app env variables
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'C:\Program Files\QGIS 3.16.16\apps\Qt5\plugins'
os.environ['PATH'] += r';C:\Program Files\QGIS 3.16.16\apps\qgis-ltr;C:\Program Files\QGIS 3.16.16\apps\qgis\bin;C:\Program Files\QGIS 3.16.16\apps\Qt5\bin'
os.environ['QGIS_PREFIX_PATH'] = r'C:\Program Files\QGIS 3.16.16\apps\qgis-ltr'
os.environ['GDAL_DATA'] = r'C:\Program Files\QGIS 3.16.16\share\gdal'
os.environ['PROJ_LIB'] = r'C:\Program Files\QGIS 3.16.16\share\proj'

os.environ['GDAL_DRIVER_PATH'] = r'C:\Program Files\QGIS 3.16.16\bin\gdalplugins'
os.environ['QT_PLUGIN_PATH'] = r'C:\Program Files\QGIS 3.16.16\apps\qgis\qtplugins;C:\Program Files\QGIS 3.16.16\apps\qt5\plugins'

Did I miss something ?

Thanks

[cid:image002.jpg at 01D8D739.62F6AA70]
Sylvain PIERRE
Chef de projet système d'information
Direction des Systèmes d'Information et du Développement Numérique
Service Projets et Ingénierie Numérique
Collectivité européenne d'Alsace
Tél : 03 88 76 68 88
sylvain.pierre at alsace.eu<mailto:sylvain.pierre at alsace.eu>
www.alsace.eu<http://www.alsace.eu>
[facebook]<http://www.facebook.com/toutelalsace> [twitter] <http://www.twitter.com/toutelalsace>  [insta] <http://www.instagram.com/toutelalsace>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221003/02a1bba5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 8094 bytes
Desc: image002.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221003/02a1bba5/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 827 bytes
Desc: image004.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221003/02a1bba5/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 851 bytes
Desc: image006.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221003/02a1bba5/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1030 bytes
Desc: image008.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221003/02a1bba5/attachment-0005.png>


More information about the QGIS-Developer mailing list