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
  • When you consistently receive an “Internal Error” from Earth Engine, please file a bug report.
    – Kevin Reid
    Commented Jul 14, 2021 at 20:57

1 Answer 1

1

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.

3
  • Where do you find this message? Is it a response to your report? Commented Mar 21, 2022 at 6:35
  • Yes, it is. Since it is an Internal error, messages are not shown to the end user (it seems) Commented Mar 24, 2022 at 15:13
  • I was having the same issue. Making the bucket public solved it. Commented Mar 24, 2022 at 17:41

Your Answer

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

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