Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ee.ee_exception.EEException: Property key "system:time_start" is invalid. Property keys must contain only letters, digits, and underscores. #59

Open
arkanoid87 opened this issue Nov 20, 2019 · 1 comment

Comments

@arkanoid87
Copy link

Traceback (most recent call last):
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/ee/data.py", line 324, in _execute_cloud_call
    return call.execute(num_retries=num_retries)
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/googleapiclient/http.py", line 856, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/image:import?alt=json returned "Property key "system:time_start" is invalid. Property keys must contain
 only letters, digits, and underscores.">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jack/gee_asset_manager/gee_asset_manager/batch_uploader.py", line 126, in upload
    task_id = __start_ingestion_task(asset_request)
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/retrying.py", line 212, in call
    raise attempt.get()
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/six.py", line 696, in reraise
    raise value
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/jack/gee_asset_manager/gee_asset_manager/batch_uploader.py", line 195, in __start_ingestion_task
    _ = ee.data.startIngestion(task_id, asset_request)
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/ee/data.py", line 1393, in startIngestion
    operation = _execute_cloud_call(
  File "/home/jack/miniconda3/envs/earthengine/lib/python3.8/site-packages/ee/data.py", line 326, in _execute_cloud_call
    raise _translate_cloud_exception(e)
ee.ee_exception.EEException: Property key "system:time_start" is invalid. Property keys must contain only letters, digits, and underscores.
@arkanoid87
Copy link
Author

time_start now is handled differently

https://developers.google.com/earth-engine/image_manifest

this quick horrible fix works:

def __create_asset_request(asset_full_path, gsid, properties, nodata_value, band_names):
    if band_names:
        band_names = [{'id': name} for name in band_names]

    return {"id": asset_full_path,
            "tilesets": [
                {"sources": [
                    {"primaryPath": gsid,
                     "additionalPaths": []
                     }
                ]}
            ],
            "bands": band_names,
            # "properties": properties,
            "start_time": { "seconds": properties["time_start"] }
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant