https://prefect.io logo
b

Brian Lorenz

02/19/2022, 12:27 AM
Hello! I'm testing out orion and have an issue with the client. When I try to run the sample for python client it gives me an error:
line 282, in get_profile_context raise MissingContextError("No profile context found.")
Any suggestions on how to fix this?
k

Kevin Kho

02/19/2022, 12:28 AM
Hey Brian, could you show me the example you are referring to?
k

Kevin Kho

02/19/2022, 12:54 AM
I tried it and it works for me:
Copy code
import asyncio
from prefect.client import get_client

async def some_function():
    async with get_client() as client:
        response = await client.hello()

        print(response.json())

if __name__=="__main__":
  asyncio.run(some_function())
what is your Orion version?
b

Brian Lorenz

02/19/2022, 1:36 AM
that works for me...not sure what I was doing wrong before. Thanks!
I was trying from python REPL and it throws the error i see. running you script it works
2 Views