[QGIS-Developer] segmentation fault in standalone script using PyQGIS

Mélanie Dol Melanie.Dol at sat-ocean.com
Thu Oct 27 07:34:06 PDT 2022


Hi all,

I'm developing a standalone script in Python, using QGIS libraires. My 
goal is to apply a style to my geopackage and save it without opening QGIS.
Before to write a standalone script, I tested my script in the python 
console of QGIS and it works.

Now, I'm trying to run it in using PYQGIS in standalone script and 
obvioulsy it doesn't work.
When I'm trying to save my layers with processing.run, a segmentation 
fault appears. Do you have any idea what is going on ? Please find 
attached my script and the QGIS version .

**************************************
*python3.8 Create_Style_QGIS.py*
/usr/share/qgis/python/plugins/processing/algs/qgis/ImportIntoSpatialite.py:103: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if uri.database() is '':
/usr/share/qgis/python/plugins/processing/algs/qgis/SpatialiteExecuteSQL.py:69: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if uri.database() is '':
/usr/share/qgis/python/plugins/processing/algs/grass7/Grass7Utils.py:191: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if path is '':
Segmentation fault (core dumped)
**************************************

Many thanks and regards,

Mélanie Dol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221027/b2651db9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QGIS_Version.png
Type: image/png
Size: 125052 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221027/b2651db9/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Create_Style_QGIS.py
Type: text/x-python
Size: 7470 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221027/b2651db9/attachment-0001.py>


More information about the QGIS-Developer mailing list