Re: Very bizarre bug I've been stuck on for a week. please help

Billy Babis

Thanks for getting back to me. I've installed the latest gdal and fiona binaries from this site given my version of python 3.9 (Gdal 3.4.1 & Fiona 1.8.2) and installed using pip. Please let me know if you have any further advice for understanding how I might be running different versions (I appreciate your patience). I trust this must be the case because honestly I've had a tremendous degree of trouble managing various packages I'm using for this and different tasks (rasterstats, rasterio, geocube, fiona, gdal). Clearly, I'm not grasping something because pip is failing me. Random bugs keep arising in other parts of my code that I can somehow get rid of temporarily by re-installing packages in my venv or re-arranging the order in which I import packages into my python script. Never dealt with such mundane issues in my life (alas, these are not Fiona problems specifically but I think maybe they are related).

Regarding the difference in file encoding between unix/linux and windows, I can see why that might produce an error. Do you think that would cause an error to arise half the time, though? I'm having trouble understanding why that would happen.

The exception is there to exclude any counties in the shapefile who's ID doesn't show up in the csv (KeyError). Nonetheless, I've heeded your advice and printed out those exceptions. As yet, it hasn't offered any further info but I will keep you posted. When the code runs in error, it still creates a shapefile with the proper number of counties but none of them have any properties.  

Billy Babis
PhD Candidate: Environmental Economics & Policy (ABD)
Computer Science B.S.

Join to automatically receive all group messages.