ivica-k / cronrange.info

3 stars 0 forks source link

problem with requirerments.txt - chalice version/pip22/python3.12 #17

Open nitzan-blink opened 1 month ago

nitzan-blink commented 1 month ago

Hi and thanks for this useful software!

on macOS, when using

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt

and then trying to run python chalicelib/cronrange.py, I get the message:

Traceback (most recent call last):
  File "/apps/cronrange.info/chalicelib/cronrange.py", line 7, in <module>
    from aws_lambda_powertools import Logger
ModuleNotFoundError: No module named 'aws_lambda_powertools'

when then trying to again install requirements, it seems that the .txt has chalice version that wants pip22, while the system has pip24. any attempts to solve that problem with the specified chalice version seem futile (rabbit hole of AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? which collides with installed python 3.12 and pip 24).

manually specifying the latest version of chalice no longer gives the above error, but still it is needed to manually install aws_lambda_powertools and only then the script will run.

ivica-k commented 1 month ago

And the first issue is in! Thank you very much for reporting this and I'm sorry you were the one to discover it and not me.

I can confirm that I can reproduce the issue every time.

I don't have a quick fix for now but I have been wanting to drop Chalice for a while now; this is another good reason why I should do it.

ivica-k commented 1 month ago

I'll release the cronrange-cli repo over the weekend; it will contain just the CLI tool itself without the web parts.

ivica-k commented 1 month ago

Hey @nitzan-blink try using https://github.com/ivica-k/cronrange-cli . Let me know how it goes!