Hi,
I am trying to self host prefect 2.0 on a gcp cloud engine vm.
I have installed prefect on the vm and set PREFECT_API_URL as "http
//<external ip>4200/api"
I tried to connect to the prefect instance from my local machine by setting the PREFECT_API_URL on my machine
and running this code:
$ # start python REPL with native await functionality
$ python -m asyncio
>>> from prefect.client import get_client
>>> async with get_client() as client:
... response = await client.hello()
... print(response.json())
š
and I got this error:
Traceback (most recent call last):
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 440, in result
return self.__get_result()
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "<console>", line 1, in <module>
File "/home/shivam/.local/lib/python3.9/site-packages/prefect/client.py", line 111, in get_client
ctx = prefect.context.get_settings_context()
File "/home/shivam/.local/lib/python3.9/site-packages/prefect/context.py", line 272, in get_settings_context
raise MissingContextError("No settings context found.")
prefect.exceptions.MissingContextError: No settings context found.
Am I missing something in the setup?