0

I have two versions of Python gdal running in different environments. One is slightly older (2.1.1) and gdal.Warp seems to work just fine there, the newer version doesn't. Has anyone else had this problem?

Edit: I'm calling gdal.Warp like this:

gdal.Warp(output_raster, input_raster, dstSRS='EPSG:3083')

Error traceback, in the env with the newer version, looks like this:

runfile('C:/Users/mrt2594/clip&reproj_GRACE_TX.py', wdir='C:/Users/mrt2594')
Traceback (most recent call last):

  File "<ipython-input-7-b1b650156b3c>", line 1, in <module>
    runfile('C:/Users/mrt2594/clip&reproj_GRACE_TX.py', wdir='C:/Users/mrt2594')

  File "C:\Anaconda\envs\osgeo-lab\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
    execfile(filename, namespace)

  File "C:\Anaconda\envs\osgeo-lab\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/mrt2594/clip&reproj_GRACE_TX.py", line 33, in <module>
    gdal.Warp(out_savepath, src_tif, options = clip_specs)

  File "C:\Anaconda\envs\osgeo-lab\lib\site-packages\osgeo\gdal.py", line 579, in Warp
    return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab, opts, callback, callback_data)

  File "C:\Anaconda\envs\osgeo-lab\lib\site-packages\osgeo\gdal.py", line 3189, in wrapper_GDALWarpDestName
    return _gdal.wrapper_GDALWarpDestName(*args)

TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'
0

Deleting all the packages from the environment and reinstalling only the bare minimum (python, gdal and their dependencies) seems to have worked - must have been some dependency / compatibility issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.