Monday 30 November 2015

gdal - GDAL_CALC works but I get a python error at the end of each process that prevents automation


Python 3.4.1, GDAL 1.11.0, OSGEO4W, Windows 7, OSGEO4W Windows Shell


All 64-bit


(ArcGIS is installed as well 10.2 with Python 2.7)



So gdal_translate works fine.


gdal_calc provides perfect outputs but at the end of each process I get the error below. This is a problem as I cannot automate anything due to this pop up error. I hit close and the error goes away, the output file is 100% perfect but then the next gdal_calc line gives me the same error.


This is a sample line of code that gives the error (almost all my gdal_calc commands give the error but not gdal_translate).


gdal_calc.py -A 2000025-2000032.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000025-2000032.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A25_32_SSTQUAL4.tiff --calc="A*B"

and this is the error. As I say the process actually works and will continue when I close the error box. After the word DONE appears the error pops up, I close the window and then the next line of code runs, then the error pops up again and so on.


enter image description here


enter image description here


Additional Error message generated


> Problem signature:
Problem Event Name: APPCRASH
Application Name: python.EXE
Application Version: 0.0.0.0
Application Timestamp: 5193f3af
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.18247
Fault Module Timestamp: 521eaf24
Exception Code: c0000005
Exception Offset: 0000000000053290

OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 8c64
Additional Information 2: 8c64dfac0942d27b36722f7434c64847
Additional Information 3: e156
Additional Information 4: e156d5603c95b65c33088aa70929b4be

Answer



As an extremely heavy-handed, last-ditch-effort approach to this, you can disable the crash dialogs in Windows using the DontShowUI value in the Windows Error Reporting registry keys.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...