I'm using Google Earth Engine's web-based code editor to grab a bunch of evapotranspiration snapshots, get a zonal mean, create a table of the results by date, and export to CSV. Code is below.

If I try to export using the raw date (from image.date()) for the date-data pair, I get "Error: Error: Feature: Invalid property name: **ee.Date**({" followed by a whole pile of attributes. See image below.

If I try to convert the date to a string (curDate.format('YYYYMMDD')), I get the same error, but it's "Error: Error: Feature: Invalid property name: **ee.String**({" followed by the same. See image below.

Is there a different way I should be doing this?

// Get Data
var dataset = ee.ImageCollection('MODIS/NTSG/MOD16A2/105') // ET
                  .filter(ee.Filter.date('2000-01-01', '2015-01-01'))
var etDataset = dataset.select('ET');
var etDatasetList = etDataset.toList(etDataset.size());
var etDatasetSize = etDatasetList.size().getInfo();

// Process
var image;
var curDate;
var curDateString;
var meanDictionary
var data = [];
for(var i = 0; i <etDatasetSize; i++){
  image = ee.Image(etDatasetList.get(i)).clip(AOI);
  curDate = image.date();
  curDateString = curDate.format('YYYYMMDD');
  meanDictionary = image.reduceRegion({
    reducer: ee.Reducer.mean(),
    geometry: AOI
  data[curDate] = meanDictionary; //For if I try to use the date itself
  // data[curDateString] = meanDictionary; // For if I try to use the string

var feature = ee.Feature(null, data);
var featureCollection = ee.FeatureCollection([feature]);
  collection: featureCollection,
  description: 'ET_Sample',
  fileFormat: 'CSV'

Error if I use a Date Error if I use a String

1 Answer 1


It is never good practice to use a for loop (client-side), especially if you want to upscale your process tot large imagecollections like you are trying here. This is an alternative .map() function (server side):

var mappedFunction = etDataset.limit(3).map(function(img){
  var test= etDataset.first().reduceRegion({
    reducer: ee.Reducer.mean(),
    geometry: AOI
  // return img.set({'ET': test.get('ET')}) // append the property to the existing 
  return ee.Feature(null, test) // or if you perse want a featureCollection

print(mappedFunction, 'mappedFunction')

see additional information on the developers page: https://developers.google.com/earth-engine/guides/client_server


  • Thanks for responding! When I run your code using the above link unmodified and then try to export, I get the following error: "Feature, argument 'metadata': Invalid type. Expected type: Dictionary<Object>. Actual type: List<Object>. Actual value: []" Feb 9, 2022 at 13:29
  • 1
    The export is still from the original function you created yourself: if the result you are looking for is indeed as I suggest then export the mappedFunction output: //Export Export.table.toDrive({ collection: mappedFunction, description: 'ET_Sample', fileFormat: 'CSV' });
    – Jobbo90
    Feb 9, 2022 at 13:32
  • Whoops, sorry I missed that. That gets me where I need to go, thank you! Feb 9, 2022 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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