Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#688 closed defect (fixed)

Fiona - DLL load failed while importing ogrext: The specified module could not be found. [AGAIN]

Reported by: ondrejsv Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description

Importing the fiona package in the new clean OSGeo4W environment results in the error

ImportError: DLL load failed while importing ogrext: The specified module could not be found.

This directly causes inability to use any other Python package that depends on the fiona, like geopackage.

Simple reproduction steps on the clean install of the latest OSGeo4W 2 with python3-fiona 1.8.17-3:

C:\app\OSGeo4W_2>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiona
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\app\OSGEO4~1\apps\Python39\lib\site-packages\fiona\__init__.py", line 86, in <module>
    from fiona.collection import BytesCollection, Collection
  File "C:\app\OSGEO4~1\apps\Python39\lib\site-packages\fiona\collection.py", line 11, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed while importing ogrext: The specified module could not be found

Note that "workaround" with creating an empty ".lib" directory mentioned in the #649 does not help. Frankly, if you check the source code file _loading.py in the fiona, I don't know how it could help.

Also the ".lib" folder is not present by default despite what is said in the #649 thread.

Change History (2)

comment:1 by jef, 3 years ago

Resolution: fixed
Status: newclosed

Updated to 1.8.20-1.

Replying to ondrejsv:

Note that "workaround" with creating an empty ".lib" directory mentioned in the #649 does not help. Frankly, if you check the source code file _loading.py in the fiona, I don't know how it could help.

Because that was a QGIS issue.

comment:2 by ondrejsv, 3 years ago

Confirming that after update to fiona 1.8.20-1, imports are succeeding.

Thank you.

C:\app\OSGeo4W_2>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiona
>>> import geopandas
>>> fiona.__version__
'1.8.20'
>>>
Note: See TracTickets for help on using tickets.