Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I import regex on AWS Lambda

I am getting the following error:

Unable to import module '': No module named 'regex._regex'

The AWS Lambda deployment package runs just fine without import htmldate statement (the module I want to use) which in turn requires regex.

Also the code runs fine locally.

So this seems to be a problem running regex on AWS Lambda.

like image 686
Gingmeister Avatar asked Nov 17 '25 13:11

Gingmeister


1 Answers

A new version of htmldate makes some of the dependencies optional, regex is such a case. That should solve the problem. (FYI: I'm the main developer of the package.)

like image 102
adbar Avatar answered Nov 20 '25 06:11

adbar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!