I have clipped the raster and updated the new raster's meta data. I am facing the following issue while writing clipped image into an output file
Code
with rasterio.open('example.tif', 'w', **out_meta) as dst:
dst.write(out_img, 1)
Error
File "C:\Users\kvars\AppData\Local\Programs\Python\Python310\lib\site-packages\rasterio\env.py", line 442, in wrapper
return f(*args, **kwds)
File "C:\Users\kvars\AppData\Local\Programs\Python\Python310\lib\site-packages\rasterio\__init__.py", line 320, in open
dataset = writer(
File "rasterio\_io.pyx", line 1520, in rasterio._io.DatasetWriterBase.__init__
File "rasterio\_io.pyx", line 1549, in rasterio._io.DatasetWriterBase._set_crs
File "rasterio\crs.pyx", line 777, in rasterio.crs.CRS.from_user_input
rasterio.errors.CRSError: The WKT could not be parsed. OGR Error code 5```