Hello! I'm trying work my way through the docs on...
# prefect-getting-started
m
Hello! I'm trying work my way through the docs on getting started with v.2.18.1 and I'm stalling out on the create a work flow piece. I'm able to authenticate via the CLI and move on to the next step but when I run this code:
Copy code
from prefect import flow


@flow(log_prints=True)
def hello_world(name: str = "world", goodbye: bool = False):
    print(f"Hello {name} from Prefect! 🤗")

    if goodbye:
        print(f"Goodbye {name}!")


if __name__ == "__main__":
    hello_world.serve(name="my-first-deployment",
                      tags=["onboarding"],
                      parameters={"goodbye": True},
                      interval=60)
Then I get this message:
Copy code
11:08:21.937 | WARNING | prefect.runner - Cannot schedule flows on an ephemeral server; run `prefect server start` to start the scheduler.
Your flow 'hello-world' is being served and polling for scheduled runs!

To trigger a run for this flow, use the following command:

        $ prefect deployment run 'hello-world/my-first-deployment'
It seems to run and the script continues to run but when checking my dashboard and trying to follow along in the steps, it never shows the run as actually scheduled. Any help would be appreciated.
k
are you using prefect cloud or hosting your own server?
m
Trying to use prefect cloud.
Working through the tutorial
k
I was about to say, have you done 'prefect cloud login` in your terminal?
m
Yes. I got to that next step.
k
if you run
prefect profile inspect
do you see your api key and api url?
m
No name provided, defaulting to 'default'
Profile 'default' is empty.
Is what I get when I run that.
k
strange, did you notice anything weird when you logged in?
your profile is where your code will look when it's time to run flows and such
m
I did not. I went through the CLI login it redirected to the page, said authentication successful and I closed the page
k
hm
m
If I run the command it gives me in the CLI
I'll revoke these but it does show that it's creating api keys
I went back and reauthed with an API key and it worked. Had to look up some args to send but it worked eventually