[gdal-dev] Test Data

Andrew Bell andrew.bell.ia at gmail.com
Mon Apr 26 07:38:38 PDT 2021


On Mon, Apr 26, 2021 at 10:18 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> Andrew,
>
> you don't need to add autotest/ogr to GDAL_DATA.
>
> Normally this is done in autotest/pytest.ini
>
Thanks. I missed that.

> I suspect you don't have the pytest-env python module installed.
>
> You should probably just run:
>
> pip3 install -U -r autotest/requirements.txt
>
I'm using conda and pip often interacts badly with it, so I've just been
using conda.

I'm still getting an error that *seems* as if it might be related to
finding test data. Is there any setting/variable I might still need to
check?

___________________________________________ test_ogr_dgn_7
___________________________________________

    def test_ogr_dgn_7():

        co_opts = ['UOR_PER_SUB_UNIT=100', 'SUB_UNITS_PER_MASTER_UNIT=100',
                   'ORIGIN=-50,-50,0']

        dgn2_ds =
ogr.GetDriverByName('DGN').CreateDataSource('tmp/dgn7.dgn',

options=co_opts)

        dgn2_lyr = dgn2_ds.CreateLayer('elements')

        dgn_ds = ogr.Open('data/dgn/smalltest.dgn')
        dgn_lyr = dgn_ds.GetLayer(0)

>       dst_feat = ogr.Feature(feature_def=dgn2_lyr.GetLayerDefn())
E       AttributeError: 'NoneType' object has no attribute 'GetLayerDefn'

Thanks,

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210426/00420cd8/attachment.html>


More information about the gdal-dev mailing list