Thread
#prefect-community
    Thanh Minh

    Thanh Minh

    10 months ago
    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
    Kevin Kho

    Kevin Kho

    10 months ago
    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
    Thanh Minh

    Thanh Minh

    10 months ago
    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
    Kevin Kho

    Kevin Kho

    10 months ago
    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
    Thanh Minh

    Thanh Minh

    10 months ago
    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
    Kevin Kho

    Kevin Kho

    10 months ago
    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.
    Thanh Minh

    Thanh Minh

    10 months ago
    thanks. Let me try it
    Git store might fit to me
    Kevin Kho

    Kevin Kho

    10 months ago
    Thanh Minh

    Thanh Minh

    10 months ago
    Hm now I got the error. Do I need to install anything else on the agent host?
    Kevin Kho

    Kevin Kho

    10 months ago
    Yeah you seed to install the github extra
    pip install prefect[github]
    or you can install pygithub
    Thanh Minh

    Thanh Minh

    10 months ago
    Success now. Many thanks!