Python script to export Sentinel-2 images from GEE to Google Drive not showing results

I’m having trouble with a Python script that’s supposed to export Sentinel-2 image bands to my Google Drive. The script uses an Excel file for site names and coordinates. Right now, I’m testing with just one site.

The code runs without errors, but nothing shows up in my Drive. Here’s what it does:

  • Reads site info from Excel
  • Creates a polygon from coordinates
  • Filters Sentinel-2 images by location and date
  • Selects red, green, blue, and NIR bands
  • Tries to export each band as a separate image

I’ve tested a simpler version that exports to Drive, so I know my Drive access is working. Any ideas why the full script isn’t producing visible results? Could there be an issue with how I’m handling the image collection or export tasks?

I can share the code if needed, but it’s pretty long. The main parts are using ee.Initialize(), ee.Authenticate(), and ee.batch.Export.image.toDrive() for the export tasks. Thanks for any help!

I’ve encountered similar issues when working with Earth Engine exports to Drive. From my experience, there are a few potential causes you might consider:

First, sometimes export tasks remain queued and never run. It can be helpful to check the Tasks tab in the Earth Engine Code Editor to see if any exports are pending or have failed. Also, the export area could be too large—reducing the size of your polygon or adjusting the scale parameter might lead to a successful export.

There is also a possibility of a delay between the task finishing and the file appearing in Google Drive, so allowing some extra time could help. Finally, ensure that you are checking the correct folder on Drive, as exports typically go to one named “Earth Engine.”

If these suggestions don’t resolve the issue, try printing intermediate results to verify that your image collection is not empty and that the date range is correctly set.

I hope these insights prove useful.

Having worked extensively with GEE and Python, I can offer some insights into your issue. One common problem is that the export tasks are created but not started automatically. You might need to explicitly call task.start() after creating each export task.

Another possibility is that your filtered image collection is empty. This can happen if your date range or area of interest doesn’t match any available imagery. Try printing the size of your image collection before exporting to confirm you have data to work with.

Also, check your band selection. Ensure you’re using the correct band names for Sentinel-2 (e.g., ‘B4’ for red, ‘B3’ for green, etc.). Incorrect band names can lead to silent failures.

Lastly, verify your coordinate system and scale. Sometimes, mismatches here can cause exports to fail without obvious errors. If these suggestions don’t help, sharing your code would allow for more specific troubleshooting.

hey luna23, had similar probs before. check ur task queue in ee code editor, sometimes they get stuck. also, make sure ur image collection isn’t empty - print size b4 export. double-check band names (B4=red, B3=green etc). and don’t forget to use task.start() after creating export tasks. hope this helps!