david hamm
10/22/2025, 4:10 PMUnable to import module 'periodic': No module named 'chardet'
I'm having difficulty finding any information on why chardet isn't getting included in the lambda package .zip file. Can anyone suggest where I might find some info on how to fix this?kapilt
10/22/2025, 4:23 PMkapilt
10/22/2025, 4:24 PMkapilt
10/22/2025, 4:25 PMdavid hamm
10/22/2025, 4:25 PMkapilt
10/22/2025, 4:27 PMdavid hamm
10/22/2025, 4:28 PMdavid hamm
10/22/2025, 4:29 PMdavid hamm
10/22/2025, 4:29 PM[WARNING] 2025-10-22T13:30:05.088Z LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.htmldavid hamm
10/22/2025, 4:30 PM[ERROR] Runtime.ImportModuleError: Unable to import module 'periodic': No module named 'chardet' Traceback (most recent call last):kapilt
10/22/2025, 4:30 PMdavid hamm
10/22/2025, 4:31 PMdavid hamm
10/22/2025, 4:31 PMdavid hamm
10/22/2025, 4:33 PMdavid hamm
10/22/2025, 4:36 PMmailer-deploy:
python3 ./scripts/transform_mailer.py -e $(env)
c7n-mailer -c ./policies/$(env)_transformed_mailer.yaml -t templates --update-lambda
you mentioned that you don't re-build the lambda package on update?david hamm
10/22/2025, 5:53 PMkapilt
10/22/2025, 6:13 PM❯ uv tree --invert --package chardet
Resolved 288 packages in 7mskapilt
10/22/2025, 6:13 PMkapilt
10/22/2025, 6:14 PMdavid hamm
10/22/2025, 7:03 PMdavid hamm
10/22/2025, 7:12 PMc7n>=0.9.18
c7n-mailer
c7n-org
c7n_gcp
My assumption would be that this would pull in the latest version.david hamm
10/22/2025, 7:26 PMdavid hamm
10/22/2025, 7:35 PMdavid hamm
10/22/2025, 7:53 PMdavid hamm
10/23/2025, 2:22 PMdavid hamm
10/23/2025, 2:23 PMdavid hamm
10/23/2025, 8:33 PM