Thread
#prefect-community
    g

    Glen Trudeau

    2 years ago
    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?
    nicholas

    nicholas

    2 years ago
    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

    Glen Trudeau

    2 years ago
    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>"})
    nicholas

    nicholas

    2 years ago
    Hm, and the image you re-registered with ECS matches the one you defined there? (including the tag)
    g

    Glen Trudeau

    2 years ago
    Yup!
    nicholas

    nicholas

    2 years ago
    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

    Glen Trudeau

    2 years ago
    Will do!
    nicholas

    nicholas

    2 years ago
    Thank you! Sorry I couldn't be of more help here, the Core team will get it sorted asap though 🙂
    g

    Glen Trudeau

    2 years ago
    Thanks for the help!