https://prefect.io logo
e

eddy davies

08/01/2022, 2:24 PM
Hey, I have just installed prefect using pip and pyenv but the Server Type is <Client Error>, can anyone help?
1
when I run
prefect version
I have also tried
pip install pysqlite3
and I am running intel macOS monterey
m

Mathijs Carlu

08/01/2022, 2:45 PM
You should first
prefect config set PREFECT_API_URL=<url-of-server>
, otherwise prefect won't be able to get a client here
e

eddy davies

08/02/2022, 10:40 AM
Which server should I be pointing it to? I am just running it locally. I ran the same commands on a different Mac and it just worked without issue. I was playing around with Dask on this problem Mac, could that be the issue?
m

Mathijs Carlu

08/02/2022, 11:06 AM
by 'it', you mean prefect server, right? Then you should set it to the url you started the server on, which is http://localhost:4200/api by default
e

eddy davies

08/02/2022, 2:40 PM
The one where i have set in manually as you suggested now just says hosted but I wanted it to look the other one, any thoughts?
m

Mathijs Carlu

08/02/2022, 3:18 PM
Alright, seems like I didn't really understand the code previously. It actually connects to a server if the PREFECT_API_URL is set, and creates a FastAPI instance otherwise. In your case however, it apparently can't manage to start up a fastapi instance. You should definitely do
prefect config unset PREFECT_API_URL
, and you can shut down the local server. But now, I'm not sure. Something in this try-catch block is throwing an exception, so maybe try to call get_client from a python script, so you can see the exception thrown? Do you have all dependencies installed?
e

eddy davies

08/03/2022, 10:40 AM
I am just running
pip install prefect
and getting no errors there. When I try to run
prefect orion start
I get this error and a similar error when I try
prefect orion database reset
m

Mathijs Carlu

08/03/2022, 11:27 AM
Can you try deleting .prefect/orion.db?
🙌🏻 1
blob attention gif 1
e

eddy davies

08/03/2022, 12:40 PM
Aye!! That's fixed it!!! Thanks for all your help. Hopefully this thread is useful to anyone else with this problem as well now
🎉 1
5 Views