dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

search_dates does not work with aws python image 3.12

Open anandsimer opened this issue 10 months ago • 0 comments

I am using the dateparser.search.search_dates() method in 3.11 and 3.12 library locally and it works fine.

>>> print(sys.version)
3.12.0 (main, Jan 28 2025, 14:59:20) [Clang 16.0.0 (clang-1600.0.26.4)]
>>> from dateparser.search import search_dates
>>> search_dates('The first artificial Earth satellite was launched on 4 October 1957.', languages=['en'])
[('on 4 October 1957', datetime.datetime(1957, 10, 4, 0, 0))]

It works well with OS: Amazon Linux 2 and Runtime: 3.11 FROM public.ecr.aws/lambda/python:3.11

However, it does not work with new base image: It returns None with OS: Amazon Linux 2023 and Runtime: 3.12 FROM public.ecr.aws/lambda/python:3.12

https://docs.aws.amazon.com/lambda/latest/dg/python-image.html -> Python base images. I am using dateparser==1.2.0

anandsimer avatar Jan 31 '25 10:01 anandsimer