landsat-pds / landsat_ingestor

Scripts and other artifacts for landsat data ingestion into Amazon public hosting.
Apache License 2.0
102 stars 18 forks source link

scene_info date handling triggering exception #13

Closed warmerdam closed 9 years ago

warmerdam commented 9 years ago

+cc @kapadia

I'm seeing lots of job failures like this:

gdaladdo -ro -r average --config COMPRESS_OVERVIEW DEFLATE --config PREDICTOR_OVERVIEW 2 --config GDAL_TIFF_OVR_BLOCKSIZE 512 LC82200762015113LGN00/LC82200762015113LGN00_B10.TIF 3 9 27 81 Traceback (most recent call last): File "/opt/planet/programs/landsat_ingestor/ingestor/l8_process_scene.py", line 115, in status = main(sys.argv[1:]) File "/opt/planet/programs/landsat_ingestor/ingestor/l8_process_scene.py", line 106, in main overwrite = args.overwrite) File "/opt/planet/programs/landsat_ingestor/ingestor/l8_process_scene.py", line 65, in process scene_info.add_mtl_info(scene_dict, scene_root, local_dir) File "/opt/planet/programs/landsat_ingestor/ingestor/scene_info.py", line 74, in add_mtl_info mtl_dict['PRODUCT_METADATA']['SCENE_CENTER_TIME']) TypeError: combine() argument 2 must be datetime.time, not str

warmerdam commented 9 years ago

Incidentally, for this scene:

Fetching: http://s3-us-west-2.amazonaws.com/landsat-pds/tarq/LC82200762015113LGN00.tar.gz

warmerdam commented 9 years ago

It seems the problem is the MTL file is sometimes quoting the scene center time now:

DATE_ACQUIRED = 2015-04-23                                                  
SCENE_CENTER_TIME = "13:09:52.8093756Z"   
warmerdam commented 9 years ago

I can confirm such jobs are now running properly.