https://prefect.io logo
b

Brennan Tolman

09/11/2023, 5:16 PM
@Marvin I am running
prefect deploy
using a
prefect.yaml
file that has worked previously, but now for some reason I keep getting the following error:
Copy code
Expecting value: line 1 column1 (char 0)
m

Marvin

09/11/2023, 5:16 PM
Oh, the joys of programming, where yesterday's solution is today's problem. This error message typically indicates that there's an issue with the JSON or YAML file you're trying to parse. It's possible that your
prefect.yaml
file is empty or not properly formatted. You might want to check the following: 1. The file is not empty. 2. The file is properly formatted as YAML. 3. The file is in the correct location and can be accessed by Prefect. If you've checked all these and everything seems fine, you might want to try running your command with a different
prefect.yaml
file to see if the problem is specific to this file. If none of this helps, I can try to look up more information for you. Just let me know.
n

Nate

09/11/2023, 5:17 PM
yeah that looks like some "reading empty json file" error could you share your deployment config thats failing?
b

Brennan Tolman

09/11/2023, 5:24 PM
Sure, here's my deployment file:
Copy code
name: my-deployment
prefect-version: 2.11.0

build: null

push: null

pull:
- prefect.deployments.steps.git_clone:
    repository: https:/my-repo.com/my-repo
    branch: main
    access_token: "{{ prefect.blocks.secret.access-token }}"

deployments:
- name: my-deployment
  version: "0.0.0"
  tags: []
  description: null
  schedule: {}
  flow_name: null
  entrypoint: src/driver.py:main
  parameters: {}
  work_pool:
    name: standard
    work_queue_name: default
    job_variables: {}
I also did just try the
prefect deployment build
command, and got this error
json.decoder.JSONDecoderError: Expecting value: line 1 column 1 (char 0)
n

Nate

09/11/2023, 5:27 PM
prefect deployment build isnt meant to work with prefect.yaml
👍 1
do you have the full trace from when you ran
prefect deploy
?
b

Brennan Tolman

09/11/2023, 5:29 PM
No -- for whatever reason I only get the prompt to identify the deployment and then it terminates with only the text
Expecting value: line 1 column 1 (char 0)
n

Nate

09/11/2023, 5:29 PM
hmmm
i wonder if your deployment specification is missing some required keys? i can look more in a bit
b

Brennan Tolman

09/11/2023, 5:30 PM
Possibly. I'll keep looking as well and see what I can find.
My prefect commands work fine when I run it through my deployment pipeline, but for whatever reason, it doesn't seem to be connecting in my development environment. Either way, it doesn't appear to be a problem with prefect itself, so don't worry about it. Thanks.