Hi. I'm new to prefect (and docker by the way).
I'm able to start
prefect server via terminal inside Pycharm. I'm starting a local
agent from a terminal in Pycharm also. Then I'm registering a flow. I open the UI and the flow is correctly registered and scheduled. I'm letting the flow run for a few times and it executes successfully.
Then I
close Pycharm and that terminates the terminals where I have started prefect server and the agent.
If I'm understanding it well, prefect server is still running on a docker container (I can see that via Docker Desktop) but I need to start a new agent.
So I run a python script to start the agent and it is successful:
from prefect.agent.local import LocalAgent
LocalAgent().start()
After that, all scheduled executions of the flow are failing with:
Failed to load and execute Flow's environment: StorageError('An error occurred while unpickling the flow:\n ModuleNotFoundError("No module named \'src\'")\nThis may be due to a missing Python module in your current environment. Please ensure you have all required flow dependencies installed.')
What am I doing wrong? I am using Windows 10, python 3.9 and a virtual environment (venv).