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

Bad date/time error in create_timelapse() function of geemap #1830

Closed
waleedgeo opened this issue Nov 13, 2023 · 1 comment
Closed

Bad date/time error in create_timelapse() function of geemap #1830

waleedgeo opened this issue Nov 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@waleedgeo
Copy link

Environment Information

Environment information Mon Nov 13 13:05:41 2023 China Standard Time

OS | Windows | CPU(s) | 16 | Machine | AMD64
Architecture | 64bit | RAM | 39.4 GiB | Environment | Jupyter
Python 3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:01:37) [MSC v.1935 64 bit (AMD64)]
geemap | 0.29.5 | ee | 0.1.378 | ipyleaflet | 0.17.4
folium | 0.15.0 | jupyterlab | 3.5.0 | notebook | 6.5.4
ipyevents | 2.0.2 | geopandas | 0.14.1 | localtileserver | 0.7.2

Description

I tried creating a timelapse using the Night Time Light dataset and create_timelapse function in geemap, but got a bad date/time error. Specifically, the date range was out of calendar range "Date: Bad date/time '2023-02-32'.", whereas I clearly input the start and end date as mentioned in the documentation.

Below is the sample code which gives this error:

import ee
import geemap
ee.Initialize()

dataset = ee.ImageCollection('NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG')\
            .select('avg_rad')

aoi = ee.Geometry.Polygon([[
            [34.19170694106985, 32.63000240098613],
            [34.19170694106985, 31.20798083643122],
            [35.62542276138235, 31.20798083643122],
            [35.62542276138235, 32.63000240098613]]])


geemap.create_timelapse(collection=dataset,
                        start_date='2023-01-01',
                        end_date='2023-05-01',
                        region=aoi,
                        bands=['avg_rad'],
                        frequency='month',
                        reducer='mean',
                        date_format='YYYY-MM-DD',
                        out_gif='test_gif.gif',
                        vis_params={'min': 0.0, 'max': 60.0, 'palette': ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']},
                        dimensions=768,
                        frames_per_second=10)

Resulting error:

Generating URL...
Date: Bad date/time '2023-02-32'.
---------------------------------------------------------------------------
HttpError                                 Traceback (most recent call last)
File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355), in _execute_cloud_call(call, num_retries)
    [354](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:354) try:
--> [355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355)   return call.execute(num_retries=num_retries)
    [356](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:356) except googleapiclient.errors.HttpError as e:

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\googleapiclient\_helpers.py:130](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:130), in positional.<locals>.positional_decorator.<locals>.positional_wrapper(*args, **kwargs)
    [129](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:129)         logger.warning(message)
--> [130](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:130) return wrapped(*args, **kwargs)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\googleapiclient\http.py:938](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:938), in HttpRequest.execute(self, http, num_retries)
    [937](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:937) if resp.status >= 300:
--> [938](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:938)     raise HttpError(resp, content, uri=self.uri)
    [939](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:939) return self.postproc(resp, content)

HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1/projects/earthengine-legacy/value:compute?prettyPrint=false&alt=json returned "Date: Bad date/time '2023-02-32'.". Details: "Date: Bad date/time '2023-02-32'.">

During handling of the above exception, another exception occurred:

EEException                               Traceback (most recent call last)
[z:\map30days\main\d13_choropleth\test_create_timelapse.ipynb](file:///Z:/map30days/main/d13_choropleth/test_create_timelapse.ipynb) Cell 3 line 1
      [5](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=4) dataset = ee.ImageCollection('NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG')\
      [6](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=5)             .select('avg_rad')
      [8](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=7) aoi = ee.Geometry.Polygon([[
      [9](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=8)             [34.19170694106985, 32.63000240098613],
     [10](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=9)             [34.19170694106985, 31.20798083643122],
     [11](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=10)             [35.62542276138235, 31.20798083643122],
     [12](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=11)             [35.62542276138235, 32.63000240098613]]])
---> [15](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=14) geemap.create_timelapse(collection=dataset,
     [16](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=15)                         start_date='2023-01-01',
     [17](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=16)                         end_date='2023-05-01',
     [18](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=17)                         region=aoi,
     [19](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=18)                         bands=['avg_rad'],
     [20](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=19)                         frequency='month',
     [21](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=20)                         reducer='mean',
     [22](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=21)                         date_format='YYYY-MM-DD',
     [23](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=22)                         out_gif='test_gif.gif',
     [24](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=23)                         vis_params={'min': 0.0, 'max': 60.0, 'palette': ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']},
     [25](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=24)                         dimensions=768,
     [26](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W1sZmlsZQ%3D%3D?line=25)                         frames_per_second=10)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\geemap\timelapse.py:1105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1105), in create_timelapse(collection, start_date, end_date, region, bands, frequency, reducer, date_format, out_gif, palette, vis_params, dimensions, frames_per_second, crs, overlay_data, overlay_color, overlay_width, overlay_opacity, title, title_xy, add_text, text_xy, text_sequence, font_type, font_size, font_color, add_progress_bar, progress_bar_color, progress_bar_height, add_colorbar, colorbar_width, colorbar_height, colorbar_label, colorbar_label_size, colorbar_label_weight, colorbar_tick_size, colorbar_bg_color, colorbar_orientation, colorbar_dpi, colorbar_xy, colorbar_size, loop, mp4, fading, parallel_scale)
   [1103](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1103) if add_text:
   [1104](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1104)     if text_sequence is None:
-> [1105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1105)         text_sequence = col.aggregate_array("system:date").getInfo()
   [1106](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1106)     add_text_to_gif(
   [1107](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1107)         out_gif,
   [1108](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1108)         out_gif,
   (...)
   [1118](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1118)         loop=loop,
   [1119](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1119)     )
   [1120](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1120) if add_colorbar:

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\computedobject.py:105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:105), in ComputedObject.getInfo(self)
     [99](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:99) def getInfo(self) -> Optional[Any]:
    [100](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:100)   """Fetch and return information about this object.
    [101](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:101) 
    [102](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:102)   Returns:
    [103](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:103)     The object can evaluate to anything.
    [104](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:104)   """
--> [105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:105)   return data.computeValue(self)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:1053](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1053), in computeValue(obj)
   [1050](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1050) body = {'expression': serializer.encode(obj, for_cloud_api=True)}
   [1051](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1051) _maybe_populate_workload_tag(body)
-> [1053](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1053) return _execute_cloud_call(
   [1054](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1054)     _get_cloud_projects()
   [1055](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1055)     .value()
   [1056](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1056)     .compute(body=body, project=_get_projects_path(), prettyPrint=False)
   [1057](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1057) )['result']

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:357](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:357), in _execute_cloud_call(call, num_retries)
    [355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355)   return call.execute(num_retries=num_retries)
    [356](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:356) except googleapiclient.errors.HttpError as e:
--> [357](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:357)   raise _translate_cloud_exception(e)

EEException: Date: Bad date/time '2023-02-32'.

OPTIONALLY:

I tried to replicate this with Landsat-8 dataset and got same error.

Landsat based code:

dataset = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2').filterDate(
    '2021-05-01', '2021-06-01'
)
# Applies scaling factors.
def apply_scale_factors(image):
  optical_bands = image.select('SR_B.').multiply(0.0000275).add(-0.2)
  thermal_bands = image.select('ST_B.*').multiply(0.00341802).add(149.0)
  return image.addBands(optical_bands, None, True).addBands(
      thermal_bands, None, True
  )

dataset = dataset.map(apply_scale_factors)

visualization = {
    'bands': ['SR_B4', 'SR_B3', 'SR_B2'],
    'min': 0.0,
    'max': 0.3,
}

aoi = ee.Geometry.Polygon([[
            [34.19170694106985, 32.63000240098613],
            [34.19170694106985, 31.20798083643122],
            [35.62542276138235, 31.20798083643122],
            [35.62542276138235, 32.63000240098613]]])


geemap.create_timelapse(collection=dataset,
                        start_date='2023-01-01',
                        end_date='2023-05-01',
                        region=aoi,
                        bands=['SR_B4', 'SR_B3', 'SR_B2'],
                        frequency='month',
                        reducer='mean',
                        date_format='YYYY-MM-DD',
                        out_gif='test_gif.gif',
                        vis_params={'bands': ['SR_B4', 'SR_B3', 'SR_B2'],'min': 0.0,'max': 0.3,},
                        dimensions=768,
                        frames_per_second=10)

Resulting Landsat error:

Generating URL...
Date: Bad date/time '2023-02-32'.
---------------------------------------------------------------------------
HttpError                                 Traceback (most recent call last)
File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355), in _execute_cloud_call(call, num_retries)
    [354](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:354) try:
--> [355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355)   return call.execute(num_retries=num_retries)
    [356](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:356) except googleapiclient.errors.HttpError as e:

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\googleapiclient\_helpers.py:130](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:130), in positional.<locals>.positional_decorator.<locals>.positional_wrapper(*args, **kwargs)
    [129](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:129)         logger.warning(message)
--> [130](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/_helpers.py:130) return wrapped(*args, **kwargs)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\googleapiclient\http.py:938](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:938), in HttpRequest.execute(self, http, num_retries)
    [937](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:937) if resp.status >= 300:
--> [938](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:938)     raise HttpError(resp, content, uri=self.uri)
    [939](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/googleapiclient/http.py:939) return self.postproc(resp, content)

HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1/projects/earthengine-legacy/value:compute?prettyPrint=false&alt=json returned "Date: Bad date/time '2023-02-32'.". Details: "Date: Bad date/time '2023-02-32'.">

During handling of the above exception, another exception occurred:

EEException                               Traceback (most recent call last)
[z:\map30days\main\d13_choropleth\test_create_timelapse.ipynb](file:///Z:/map30days/main/d13_choropleth/test_create_timelapse.ipynb) Cell 4 line 2
     [14](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=13) visualization = {
     [15](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=14)     'bands': ['SR_B4', 'SR_B3', 'SR_B2'],
     [16](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=15)     'min': 0.0,
     [17](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=16)     'max': 0.3,
     [18](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=17) }
     [20](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=19) aoi = ee.Geometry.Polygon([[
     [21](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=20)             [34.19170694106985, 32.63000240098613],
     [22](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=21)             [34.19170694106985, 31.20798083643122],
     [23](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=22)             [35.62542276138235, 31.20798083643122],
     [24](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=23)             [35.62542276138235, 32.63000240098613]]])
---> [27](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=26) geemap.create_timelapse(collection=dataset,
     [28](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=27)                         start_date='2023-01-01',
     [29](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=28)                         end_date='2023-05-01',
     [30](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=29)                         region=aoi,
     [31](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=30)                         bands=['SR_B4', 'SR_B3', 'SR_B2'],
     [32](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=31)                         frequency='month',
     [33](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=32)                         reducer='mean',
     [34](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=33)                         date_format='YYYY-MM-DD',
     [35](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=34)                         out_gif='test_gif.gif',
     [36](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=35)                         vis_params={'bands': ['SR_B4', 'SR_B3', 'SR_B2'],'min': 0.0,'max': 0.3,},
     [37](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=36)                         dimensions=768,
     [38](vscode-notebook-cell:/z%3A/map30days/main/d13_choropleth/test_create_timelapse.ipynb#W3sZmlsZQ%3D%3D?line=37)                         frames_per_second=10)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\geemap\timelapse.py:1105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1105), in create_timelapse(collection, start_date, end_date, region, bands, frequency, reducer, date_format, out_gif, palette, vis_params, dimensions, frames_per_second, crs, overlay_data, overlay_color, overlay_width, overlay_opacity, title, title_xy, add_text, text_xy, text_sequence, font_type, font_size, font_color, add_progress_bar, progress_bar_color, progress_bar_height, add_colorbar, colorbar_width, colorbar_height, colorbar_label, colorbar_label_size, colorbar_label_weight, colorbar_tick_size, colorbar_bg_color, colorbar_orientation, colorbar_dpi, colorbar_xy, colorbar_size, loop, mp4, fading, parallel_scale)
   [1103](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1103) if add_text:
   [1104](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1104)     if text_sequence is None:
-> [1105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1105)         text_sequence = col.aggregate_array("system:date").getInfo()
   [1106](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1106)     add_text_to_gif(
   [1107](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1107)         out_gif,
   [1108](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1108)         out_gif,
   (...)
   [1118](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1118)         loop=loop,
   [1119](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1119)     )
   [1120](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/geemap/timelapse.py:1120) if add_colorbar:

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\computedobject.py:105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:105), in ComputedObject.getInfo(self)
     [99](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:99) def getInfo(self) -> Optional[Any]:
    [100](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:100)   """Fetch and return information about this object.
    [101](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:101) 
    [102](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:102)   Returns:
    [103](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:103)     The object can evaluate to anything.
    [104](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:104)   """
--> [105](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/computedobject.py:105)   return data.computeValue(self)

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:1053](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1053), in computeValue(obj)
   [1050](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1050) body = {'expression': serializer.encode(obj, for_cloud_api=True)}
   [1051](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1051) _maybe_populate_workload_tag(body)
-> [1053](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1053) return _execute_cloud_call(
   [1054](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1054)     _get_cloud_projects()
   [1055](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1055)     .value()
   [1056](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1056)     .compute(body=body, project=_get_projects_path(), prettyPrint=False)
   [1057](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:1057) )['result']

File [c:\Users\walee\miniconda3\envs\gee\lib\site-packages\ee\data.py:357](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:357), in _execute_cloud_call(call, num_retries)
    [355](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:355)   return call.execute(num_retries=num_retries)
    [356](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:356) except googleapiclient.errors.HttpError as e:
--> [357](file:///C:/Users/walee/miniconda3/envs/gee/lib/site-packages/ee/data.py:357)   raise _translate_cloud_exception(e)

EEException: Date: Bad date/time '2023-02-32'.

Lastly, I even tried running this on MacOS (M1 Macbook air), and got the same results.
Let me know if any further details/explanations are required.

@waleedgeo waleedgeo added the bug Something isn't working label Nov 13, 2023
@giswqs
Copy link
Member

giswqs commented Nov 13, 2023

The date format should be YYYY-MM-dd, not YYYY-MM-DD
https://geemap.org/timelapse/#geemap.timelapse.create_timelapse
image

test_gif

@giswqs giswqs closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants