New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FionaValueError: No dataset found at path #410
Comments
@vanderlist can you provide a little more context, like a complete script (smaller the better) that produces the error? I'll try it out. |
I suspect that there is something wrong with the gdal installation you have. I'm not sure if you can mix gdal from gisinternals with the fiona binaries from gohlke. If you use the fiona binaries, I would suggest to use the same gdal libraries fiona is compiled against. Do you have other versions of gdal installed, e.g. from osgeo4w? Could you check if ogrinfo works? It should be located in C:\Python\Lib\site-packages\osgeo or similar. Regarding orgext.pyx: Gdal 1.x ist not API compatible to Gdal 2.x. Fiona uses orgext1.pyx for gdal 1.x and ogrext2.pyx for gdal 2.x. At compile time, ogrext.pyx is created from either orgext1.pyx or orgext2.pyx depending on the installed version of gdal. |
Hello, I seem to have a solution for fiona. So I tried what @rbuffat suggested and deinstalled everything and not reinstalled the GISinternals GDAL. I even deinstalled QGIS to have no other Python and/or GDAL where ever. Although it had worked before with them installed. I then installed my previous setup again. And added C:\Python27\Lib\site-packages\osgeo as PATH instead of C:\Program Files\GDAL so I could use GDAL in cmd (the reason I thought I needed the GISinternals GDAL in the first place). I also changed the GDAL_DATA and GDAL_DRIVER_PATH variables accordingly. Fiona seems to work now with:
However rasterstats 0.11.0 does not. With:
It gives me
I don't know what goes wrong there. The problem was indeed the GDAL fiona is looking for when installing. One step closer but not yet there. |
@vanderlist it is indeed very easy to get into a bad situation with too many GDALs installed. I'm sorry about that! There's a chance that upgrading to rasterstats 0.10.1 will fix your problem. I see it has a possibly related change: perrygeo/python-rasterstats@c6c8568 /cc @perrygeo |
@sgillies |
Hello @sgillies Anyway, from a first time poster (but longer user): Thank you all for looking into this. |
@vanderlist can you try this and report the results:
If you do only |
You are correct, the same problem. So, it is still a Fiona problem, or more specifically a 'Fiona 1.6.3 on my setup' problem. I will try and upgrade to Fiona 1.7.1 using Gohlke's whl. And see if the problem persists. No use in trying to solve something in an old version, I think. For the record: |
@vanderlist are you able to share the shapefile? I'd like to rule out a problem in the dataset itself. |
If I upgrade to Fiona 1.7.1 I get the following with
I can share the shape file but it happens with all the shape files sample_selector_grid100_m0_tmp.zip . |
I think fiona 1.6.3 is incompatible with gdal 2.0. Support for Gdal 2.x was introduced with 1.7.0.
|
This is the case. But it worked before. From Golhke:
Of course I did not know which GDAL Fiona used (Gohlke's or GisInternals GDAL, both were 2.x though). Sorry for not understanding. I think I'm really overlooking something that happened and broke it. I will look into the |
Correction:
It's only after I try to
|
Ok, it's defintely a dependency problem with Fiona 1.7.1 not finding the GDAL dll. I checked |
I would recommend deinstalling all gdal / fiona / rasterio libraries.Then check site-packages for left-overs. Then download the latest gdal / fiona / rasterio wheels from gohlke and install them. If you sue the wheels from gohlke, I would only use wheels that are downloaded at the same time, because of the dependencies with gdal. |
Good news everyone, I got it working.
To recapitulate: Now that the GISinternals GDAL is removed, the Gohlke GDAL 2.1.2 doesn't crash anymore and it now all works but it took some time for me to try this version again. Which was actually the 2nd part of the issue here. I also got a small hiccup went l installed rasterio 0.36.0, but it of course needs Gohlke GDAL 2.0.2 so rasterio1.0a3 did the trick. I can also confirm that rasterstats 0.11.0 is needed (0.10.3 does not work). It all seems logic now. I would like to thank you, @rbuffat @sgillies and @perrygeo, for dealing with this problem even though you shouldn't have. Thank you for being my listening board. What still remains (and probably forever): Ciao. |
Maybe Fiona 1.6.3 from Gohlke was patched with fixes from the fiona 1.7.0 dev branch to work with gdal 2.0. The filename Fiona-1.6.3+gdal200-cp27-none-win32.whl suggests something like this. |
I suddenly keep getting:
I use fiona through rasterstats (https://github.com/perrygeo/python-rasterstats). I get this with every .shp files. Even those that used to work.
The problem is that I don't know exactly what changed.
I've updated to:
Python 2.7.13
And from Gohlke:
Fiona 1.7.1
GDAL 2.0.2 (because the 2.1.2 version resulted in Python crashes)
From gisinternals
GDAL 2.1.2
and it started not working.
I used to use:
Python 2.7.11
And from Gohlke:
Fiona 1.6.3
GDAL 2.0.2
From gisinternals
GDAL 2.1.0
The problem is when I uninstall everything (even GDAL from gisinternals) and go back to 1.6.3, the problem persists.
ogrext.pyx doesn't seems to be anywhere (only .pyd) but I guess that's normal?
I apologize already for probably not giving enough information. Many thanks in advance.
The text was updated successfully, but these errors were encountered: