0

When trying to export an ee.Image using ee.batch.Export.map.toCloudStorage() I'm getting an "Internal error" after a while (from 500 to 1000 seconds), regardless of what I try: exporting other assets, changing the scale, setting visualization options...

This is not working:

# Check task status
def status(task):
  start_time = time.time()
  print("Polling each 5 seconds for task id: {}".format(task.id))
  while task.active():
    time.sleep(5)
  if task.status()["state"]=="FAILED":
    print("TASK FAILED: {}".format(task.status()["error_message"]))
    print(task.status())
  else:
    print(task.status()["state"])
  print("Task took %s seconds" % (time.time() - start_time))

# Export tiles
image = ee.Image("users/username/asset")
task = ee.batch.Export.map.toCloudStorage(
    image= image,
    description= "tile-test"
    scale= 20,
    bucket= "name-of-the-bucket"
)
task.start()
status(task)

Also I've tried code from an answer found here. It returns the same error. Note: I have no problems writing to this bucket with ee.batch.Export.image.toCloudStorage(). ACLs are set to "fine-grained" for this bucket.

Is this a problem with my bucket or something else? I've run out of ideas.

1
0

As suggested by Kevin Reid I filed a bug report and it turns out the task was failing internally with the following message:

The member bindings allUsers and allAuthenticatedUsers are not allowed since public access prevention is enforced.

Which means that the project didn't allow public access to the bucket. Changing the project permissions solved the 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.