Hi Team, I have run a simple flow and facing below...
# ask-community
p
Hi Team, I have run a simple flow and facing below issue and not able to connect to the server, could you please help to resolve this issue. Running the flow in local. with SyncClientContext() as ctx: ^^^^^^^^^^^^^^^^^^^ File "C:\Users\pk\Documents\test prefect flow\myenv\Lib\site-packages\prefect\context.py", line 212, in enter self.client.raise_for_api_version_mismatch() File "C:\Users\pk\Documents\test prefect flow\myenv\Lib\site-packages\prefect\client\orchestration.py", line 3686, in raise_for_api_version_mismatch raise RuntimeError(f"Failed to reach API at {self.api_url}") from e RuntimeError: Failed to reach API at http://127.0.0.1:4200/api/
n
hi @pk - what does
prefect config view
show?
p
Hi Nate, below is the config details prefect config view PREFECT_PROFILE='local' PREFECT_API_URL='http://127.0.0.1:4200/api' (from env)
n
are you running a server locally?
p
yes
n
what does
prefect version
say?
p
prefect --version 3.0.4
n
please do
prefect version
if possible, it includes extra useful info
p
okay
Version: 3.0.4 API version: 0.8.4 Python version: 3.12.7 Git commit: c068d7e2 Built: Tue, Oct 1, 2024 11:54 AM OS/Arch: win32/AMD64 Profile: local Server type: server Pydantic version: 2.9.2
n
hmm I cannot reproduce directly. I wonder if this has to do with being on windows somehow
p
okay , i have also ensured firewall and network settings on Windows to ensure that they are not blocking connections to 127.0.0.1 on port 4200