Jeremy Phelps
01/11/2021, 6:38 PMagent@prefect-agent:~/.prefect/results$ prefect run flow --name 'My first Flow' --project test
Traceback (most recent call last):
File "/home/agent/.pyenv/versions/3.7.3/bin/prefect", line 10, in <module>
sys.exit(cli())
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/prefect/cli/run.py", line 186, in flow
run_name=run_name,
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/prefect/client/client.py", line 1094, in create_flow_run
res = self.graphql(create_mutation, variables=dict(input=inputs))
File "/home/agent/.pyenv/versions/3.7.3/lib/python3.7/site-packages/prefect/client/client.py", line 319, in graphql
raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'message': "Required parameters were not supplied: {'numbers'}", 'locations': [{'line': 2, 'column': 5}], 'path': ['create_flow_run'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': "Required parameters were not supplied: {'numbers'}"}}}]
I checked the Docker logs and found this GraphQL error:
GraphQL request:2:3
1 | mutation ($input: create_flow_run_input!) {
2 | create_flow_run(input: $input) {
| ^
3 | id
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/graphql/execution/execute.py", line 628, in await_result
return await result
File "/prefect-server/src/prefect_server/graphql/extensions.py", line 52, in resolve
result = await result
File "/prefect-server/src/prefect_server/graphql/runs.py", line 119, in resolve_create_flow_run
run_config=input.get("run_config"),
File "/prefect-server/src/prefect_server/api/runs.py", line 74, in create_flow_run
run_config=run_config,
File "/prefect-server/src/prefect_server/api/runs.py", line 215, in _create_flow_run
raise ValueError(f"Required parameters were not supplied: {missing}")
ValueError: Required parameters were not supplied: {'numbers'}
Alex Cano
01/11/2021, 6:44 PMnumbers
. It doesn’t look like there is a default value, so Server is erroring out because there isn’t a parameter value.
You should be able to solve this in one of two ways:
• Add a default value for the parameter so that you can create a flow run without specifying a value for numbers
• Create your flow run with a value for numbers
If you’re wanting to continue to use the cli
to run your flow, specify the --ps
option, which is a stringified JSON object that holds values for your paramters. I’d guess yours should look something like:
prefect run flow --name 'My first Flow --project test --ps '{"numbers": [1, 2, 3]}'
Jeremy Phelps
01/11/2021, 6:50 PMAlex Cano
01/11/2021, 6:56 PMJeremy Phelps
01/11/2021, 6:57 PMdocker-proxy
process listening on port 8080 on that machine.Alex Cano
01/11/2021, 7:02 PMdocker-proxy
process does for you offhand, does it just forward traffic from one location to another? Like do you have this set up externally to Server so that traffic at localhost:8080
gets forwarded to one of the services specifically?Jeremy Phelps
01/11/2021, 7:04 PMprefect server start
, it started the Docker images, and I was able to connect to the API from the other machine with no additional configuration.Alex Cano
01/11/2021, 7:07 PMprefect run flow
command on the same machine running your Server? Because if that’s the case, I’m guessing the CLI is seeing that Server is on localhost. Additionally, do you have a configuration file with the value for`server.ui.endpoint` ? Or are you using the default?Jeremy Phelps
01/11/2021, 7:07 PMprefect run flow
on the other machine, where the Agent is set up.prefect describe flow-runs
), and the Agent isn't using any either.Alex Cano
01/11/2021, 7:15 PM#prefect-community
channel? It’ll likely be solved more quickly there!Jeremy Phelps
01/11/2021, 7:15 PM