<@ULVA73B9P> i am getting error when deploying flo...
# ask-marvin
r
@Marvin i am getting error when deploying flow with process pool. prefect deploy --prefect-file prefect_local.yaml --name dep-name invalid literal for int() with base 10: ‘None’
m
thought for 201.0 seconds
Thanks for the report. That error almost always means something in your deployment config that Prefect expects to be an integer is being read as the string "None" (or a value with smart quotes like ‘None’), and Python is trying to convert it to an int. Common culprits in prefect.yaml/prefect_local.yaml: - schedule.interval (must be a number of seconds, not "None") - retries (must be an int) - retry_delay_seconds (must be an int) - any other numeric fields that were set to the string "None" instead of a real null Quick checks - Search your prefect_local.yaml for None or ‘None’ and change them to YAML nulls (null or ~) or remove the field entirely if you don’t need it. - Make sure you aren’t using smart quotes. Replace ‘ ’ with plain ' or remove quotes if not needed. - Ensure numeric fields are bare numbers, not quoted strings. Example If you have:
Copy code
schedule:
  interval: 'None'
retries: 'None'
retry_delay_seconds: 'None'
Change to:
Copy code
# remove schedule entirely if you don't want one
# or set a real interval in seconds
schedule:
  interval: 3600

# if you don’t want retries, remove the fields or set explicit ints
retries: 0
retry_delay_seconds: 0
A minimal working process-pool deployment example:
Copy code
name: my-project
prefect-version: "3.*"

deployments:
- name: dep-name
  entrypoint: flows/my_flow.py:my_flow
  work_pool:
    name: process-pool
  # optional
  parameters: {}
  # optional schedule example
  # schedule:
  #   cron: "0 * * * *"
  #   timezone: "UTC"
A couple of questions to help pinpoint it: - What’s your Prefect version (
prefect version
)? - Can you share the relevant parts of your prefect_local.yaml (especially the deployments block and any schedule/retries fields)? - Is the exact error text showing fancy quotes around None (like ‘None’)? Docs for reference: prefect.yaml configuration in Prefect 3 Once you paste the snippet, I can call out the exact field causing the issue.
r
@Marvin
Copy code
- name: my-service
  tags: [my-service]
  description: Run my service locally with Docker
  flow_name: my_service_flow
  entrypoint: app/flows/service_flow.py:my_service_flow
  work_pool:
    name: my-process-pool
m
thought for 94.8 seconds
Thanks for the snippet — a couple things jump out that could cause this: 1) Invalid keys in Prefect 3.x -
tags
and
flow_name
are not valid deployment keys in Prefect 3.x
prefect.yaml
. The flow name is inferred from your
entrypoint
. Remove both of these keys. - Valid keys include
name
,
entrypoint
,
description
,
parameters
,
schedule
, and
work_pool
(plus
work_pool.job_variables
for per-run settings). - Docs: prefect.yaml in Prefect 3 2) The actual error: “‘None’” being parsed as an int - Your error shows curly quotes around None: ‘None’. That means somewhere in your YAML a value is literally the string ‘None’ (with smart quotes) for a field that expects an integer. - Common places this happens:
retries
,
retry_delay_seconds
,
concurrency
, or a
schedule.interval
. - Fix by removing those fields if you don’t use them, or set proper numbers, and ensure there are no smart quotes. Use
null
(or omit the field) instead of "None". Here’s a minimal, valid deployment block for a process pool you can drop into `prefect_local.yaml`:
Copy code
name: my-project
prefect-version: "3.*"

deployments:
- name: my-service
  description: Run my service locally with Process
  entrypoint: app/flows/service_flow.py:my_service_flow
  work_pool:
    name: my-process-pool
    # optional job variables for process workers
    # job_variables:
    #   stream_output: true
    #   working_dir: .
    #   env:
    #     MY_ENV: "value"
If you intended to “tag” runs: deployment-level tags are not supported in 3.x. If you need labels on the worker job, you can use
job_variables.labels
(note: those are key/value labels for the worker, not run tags). Could you share: - Your full
prefect_local.yaml
(including the top-level `name`/`prefect-version` and any `schedule`/`retries` fields)? - Your Prefect version (
prefect version
)? With that I can point to the exact field that’s causing the
int()
on ‘None’.
r
@Marvin how can i see the full trace?
m
thought for 182.7 seconds
A couple easy ways to get more detail (including stack traces) when running prefect deploy: One-off (just for this command)
Copy code
PREFECT_LOGGING_ROOT_LEVEL=DEBUG prefect deploy --prefect-file prefect_local.yaml --name dep-name
Persist for your profile
Copy code
prefect config set PREFECT_LOGGING_ROOT_LEVEL=DEBUG
# verify
prefect config view | grep PREFECT_LOGGING_ROOT_LEVEL
Optional: enable debug mode (if your Prefect version supports it)
Copy code
prefect config set PREFECT_DEBUG_MODE=true
prefect config view | grep PREFECT_DEBUG_MODE
Then rerun your deploy command. If you still don’t see a full traceback, paste the DEBUG output here and I’ll help trace it to the exact field. Docs: - Logging customization - Settings reference