Hey hey! I have this small flow I want to try and ...
# prefect-cloud
i
Hey hey! I have this small flow I want to try and deploy
Copy code
@flow(name="LO", flow_run_name="test-LO")
def live_odds_poc():
    logger = get_run_logger()
    <http://logger.info|logger.info>("Starting LO poc flow")

    flow = LiveOdds()
    lo_result = flow.run_flow()
and I’m doing running this
Copy code
if __name__ == "__main__":
    live_odds_poc.serve(
        name="LO-test",
        tags=["LO"],
        interval=15
    )
but when I run it I get this Attribute Error ->
AttributeError: 'Flow' object has no attribute 'serve'
I have followed the tutorial in Prefect Cloud and I don’t see anything wrong (I also copied the code from the tutorial and got the same error). Can you help me? 🙏
1
j
What does running
prefect version
in the terminal output?
i
Copy code
Version:             2.11.5
API version:         0.8.4
Python version:      3.9.13
Git commit:          a597971f
Built:               Thu, Aug 24, 2023 2:14 PM
OS/Arch:             darwin/x86_64
Profile:             default
Server type:         cloud
j
Ah. I think that’s the issue. Do a
pip install -U prefect
and you’ll get version 2.13.0, which has that method in it. 🙂
i
that worked! thanks so much!
🙌 3
j
Great!