Hi I have a question: I'm using my laptop to code ...
# ask-community
t
Hi I have a question: I'm using my laptop to code the flow, then I deploy it. After that I open my vps and run as Agent and seem like it not work
k
I think this doesn’t work because you didn’t specify a storage? The default Storage is Local which just saves it as a file locally. If you want it to be pulled by any agent, you need to store it somewhere like S3 or Github
See this
t
My flow does not touch any storaged, it just call API and then call another API to save data
The error is about missing module to run
k
Yes because the Storage is where the Flow is stored and then the agent imports it from that Storage by default, it will be saved in something like
./prefect/flows/…
. But then your agent doesn’t have that file at that location (it’s on the computer you registered from). So it will try to import but fail
t
Thanks. This is the error
So I don't think it because of Storaged, I will try to read it through
the
/User/thanhminh
is on my laptop path
k
Yeah so all Flows need Storage, and registration puts the Flow into the storage. During execution, the Flow is retrieved from that Storage. When you registered on your computer, a file was created in the
Users/…
folder there. When you run it on the agent, it looks for the same path, but it doesn’t have that file.
t
thanks. Let me try it
Git store might fit to me
k
t
Hm now I got the error. Do I need to install anything else on the agent host?
k
Yeah you seed to install the github extra
pip install prefect[github]
or you can install pygithub
t
Success now. Many thanks!
👍 1