Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Cannot import fiona. Urecognized symbol OSRFixup #3

Closed
meyer1994 opened this issue Sep 11, 2019 · 3 comments
Closed

Cannot import fiona. Urecognized symbol OSRFixup #3

meyer1994 opened this issue Sep 11, 2019 · 3 comments

Comments

@meyer1994
Copy link
Contributor

meyer1994 commented Sep 11, 2019

I've created a layer using the script. It throws an error when trying to import fiona.

[ERROR] Runtime.ImportModuleError: Unable to import module 'app': /opt/python/fiona/ogrext.cpython-37m-x86_64-linux-gnu.so: undefined symbol: OSRFixup

I've created this layer using the script in the scripts directory. I used this image:

remotepixel/amazonlinux:gdal3.0-py3.7-full

To create the error I used a simple chalice lambda function:

import subprocess

# Testing imports
import fiona
import rasterio
import shapely
from osgeo import gdal, ogr, osr

from chalice import Chalice

app = Chalice(app_name='test')

@app.lambda_function()
def index(event, context):
    # Testing bin
    result = subprocess.run(['gdalinfo', '--formats'])
    assert result.returncode == 0
    return {'it': 'worked'}

Everything works fine when removing the fiona import.

Edit:

I've just read that fiona does not yet support gdal 3. So there is the problem. But, rasterio works and it does not support it yet aswell. Any ideas how to fix?

@meyer1994 meyer1994 changed the title Cannot import fiona. Urecognized symbol Cannot import fiona. Urecognized symbol OSRFixup Sep 11, 2019
@meyer1994
Copy link
Contributor Author

When using the other 2.4.2 version it works correctly.

@vincentsarago
Copy link
Member

thanks for the report @meyer1994 I didn't know that fiona didn't support GDAL 3.0 yet sorry about that.
I'll make a note (or remove fiona)

@vincentsarago
Copy link
Member

removed fiona from the layer for now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants