Thread
#prefect-community
    b

    Brian Lorenz

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

    Kevin Kho

    7 months ago
    Hey Brian, could you show me the example you are referring to?
    b

    Brian Lorenz

    7 months ago
    Kevin Kho

    Kevin Kho

    7 months ago
    I tried it and it works for me:
    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

    7 months ago
    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