What is causing code to fail after creating executable? Fiona CRS error

177 Views Asked by At

I have some code that uses geopandas to take data and convert it to a shapefile. The code works perfectly fine when I run it in pycharm. However, if I put the code into a executable using "pyinstaller --onefile" the executable fails to run.

Note that getting geopandas to work at all with pyinstaller was a massive pain and only after a couple days of googling and tinkering was I able to get that to work.

This is the error that the executable gives me:

Traceback (most recent call last):

  File "Shapefile_Tool.py", line 3601, in module

   create_shapefile()

  File "Shapefile_Tool.py", line 3593, in create_shapefile

   shapefile.to_file(Path(output_filepath, 'Final_Shapefile'))

  File "geopandas\geodataframe.py", line 515, in to_file

  File "geopandas\io\file.py", line 128, in to_file

  File "fiona\env.py", line 408, in wrapper

  File "fiona\__init__.py", line 285, in open

  File "fiona\collection.py", line 153, in __init__

  File "fiona\_crs.pyx", line 78, in fiona._crs.crs_to_wkt

fiona.errors.CRSError: Invalid input to create CRS: epsg:32012

[53860] Failed to execute script 'Shapefile_Tool' due to unhandled exception!

Any help is greatly appreciated.

0

There are 0 best solutions below