[QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster
David Marteau
dmarteau at 3liz.com
Tue Mar 26 10:38:36 PDT 2019
Hi Alessandro
No there is nothing at all in the logs.
I have used the same reduced snippet on qgis 3.4.5 (ltr) on Stretch and qgis 3.6.0 (release) on buster, using the same datasource:
```
import os
from qgis.core import QgsApplication, QgsVectorLayer
# prevent display not found error
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
qgis_application = QgsApplication([], False )
layer = QgsVectorLayer('path/to/data')
layer.isValid() # Return True on 3.4.5/stretch, False on 3.6.0/buster whatever the data
```
If the release package has not been updated in the previous 24 h, I suspect that something has been broken on the buster distro.
Note that I'm able to load shapefile in python with ogr (gdal-python).
> Le 26 mars 2019 à 17:47, Alessandro Pasotti <apasotti at gmail.com> a écrit :
>
>
> On Tue, Mar 26, 2019 at 5:45 PM David Marteau <dmarteau at 3liz.com <mailto:dmarteau at 3liz.com>> wrote:
>
> The situation seems to be worst: it seems that no layers can be read from python whatever the format.
>
>
>> Le 26 mars 2019 à 17:38, David Marteau <dmarteau at 3liz.com <mailto:dmarteau at 3liz.com>> a écrit :
>>
>> Hi devs,
>>
>> We use to build docker images of the latest qgis releases and we have a regression affecting version 3.6.0 official release on buster
>>
>> Qgis: 3.6.0 on Debian
>>
>> If we read a layer with python:
>>
>>> layer = QgsVectorLayer('./mydata.shp')
>>
>> Then the layer is invalid (no warning, no errors)
>>
>> Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work flawlessly and lead to a valid layer.
>>
>> This was not affecting previous build 24 h ago (release end nightly-release)
>>
>> The tests were based with shapefiles from testdata in qgis sources.
>>
>> We are not sure it that come from Qgis itself or from a change on the distribution.
>>
>> David,
>>
>
>
> Hi David,
>
> anything in the logs?
>
> I would check QGIS_PREFIX_PATH env var, and make sure the provider libraries are found and loaded.
>
>
> --
> Alessandro Pasotti
> w3: www.itopen.it <http://www.itopen.it/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190326/6e238b07/attachment.html>
More information about the QGIS-Developer
mailing list