Another Question. We were getting `Failed to load ...
# prefect-community
g
Another Question. We were getting
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named 'sqlalchemy'")
when running a flow on Fargate agent which I assume is due to the fact that the base docker image doesn’t have that module installed. But when we tried downloading the public image, adding the necessary modules and then uploading to ECR it doesn’t appear that the agent is utilizing the updated image even though we called it inside of the container definitions (reference python wrapper). We see the below screenshot for the new task definition in ECS which means it isn’t pulling the specified image correctly. Any suggestions?
n
Hi @Glen Trudeau - at a glance this looks to be a problem with your Flow’s environment, not the environment of your agent. Can you confirm your flow is referencing the correct image?
g
I’m referencing it currently like:
f.environment = LocalEnvironment(metadata={"image":"<http://12345678910.dkr.ecr.us-east-2.amazonaws.com/analytics-repo:latest|12345678910.dkr.ecr.us-east-2.amazonaws.com/analytics-repo:latest>"})
n
Hm, and the image you re-registered with ECS matches the one you defined there? (including the tag)
g
Yup!
n
Got it, thanks @Glen Trudeau - can you open an issue with the code you used for your flow and agent (or a min reproducible example)? That'll let the Core team triage this better.
g
Will do!
n
Thank you! Sorry I couldn't be of more help here, the Core team will get it sorted asap though 🙂
g
Thanks for the help!
😄 1