<@ULVA73B9P> Expecting value: line 1 column 1 (cha...
# ask-marvin
s
@Marvin Expecting value: line 1 column 1 (char 0) while running prefect deploy, also how do i set a new profile's url
m
thought for 178.7 seconds
That JSONDecodeError usually means your client is talking to the UI instead of the API. If
PREFECT_API_URL
points at the root (e.g., http://127.0.0.1:4200) the server returns HTML, and
prefect deploy
tries to parse it as JSON and fails with “Expecting value: line 1 column 1”. For a self‑hosted Prefect 3 server, your API URL must include the /api suffix. For your local instance, set it to: - http://127.0.0.1:4200/api How to create a new profile and set its URL 1) Create and activate a profile:
Copy code
prefect profile create local
prefect profile use local
2) Set the API URL for that profile:
Copy code
prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>
3) Validate / inspect:
Copy code
prefect config view
prefect config validate
4) Retry:
Copy code
prefect deploy
If you also have a remote self‑hosted instance, make a second profile:
Copy code
prefect profile create remote
prefect profile use remote
prefect config set PREFECT_API_URL=http://<your-remote-host>:<port>/api
Quick health check - Hitting the root (/) returns HTML (the UI) — wrong for clients - The API should respond at /api; for example:
Copy code
curl <http://127.0.0.1:4200/api/health>
This should return a small JSON/OK response. If you see HTML, your URL or reverse proxy routing is off. A couple of helpful commands - List/switch profiles:
Copy code
prefect profile ls
prefect profile use <name>
If you share the current value of
PREFECT_API_URL
(
prefect config view | grep PREFECT_API_URL
) and your Prefect version (
prefect version
), I can double‑check compatibility and confirm you’re pointed at the right endpoint. Docs for reference: - Settings and profiles: Settings and profiles - Manage settings via CLI/env: Manage settings - Self-hosted server overview: Prefect Server - Deployments (prefect.yaml projects): Deployments with prefect.yaml