YD
01/07/2023, 8:57 PM$ prefect version
Version: 2.7.7
API version: 0.8.4
Python version: 3.8.10
Git commit: e8ca30b8
Built: Fri, Jan 6, 2023 4:25 PM
OS/Arch: linux/aarch64
Profile: default
Server type: cloud
Error:
$ prefect deployment apply run_collect_stocks_data-deployment.yaml
Successfully loaded 'yquark_deployment'
Traceback (most recent call last):
File "/home/youval/.local/lib/python3.8/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/home/youval/.local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 230, in coroutine_wrapper
return run_async_in_new_loop(async_fn, *args, **kwargs)
File "/home/youval/.local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 181, in run_async_in_new_loop
return anyio.run(partial(__fn, *args, **kwargs))
File "/home/youval/.local/lib/python3.8/site-packages/anyio/_core/_eventloop.py", line 70, in run
return asynclib.run(func, *args, **backend_options)
File "/home/youval/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 292, in run
return native_run(wrapper(), debug=debug)
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/youval/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
return await func(*args)
File "/home/youval/.local/lib/python3.8/site-packages/prefect/cli/deployment.py", line 594, in apply
deployment_id = await deployment.apply()
File "/home/youval/.local/lib/python3.8/site-packages/prefect/deployments.py", line 633, in apply
deployment_id = await client.create_deployment(
File "/home/youval/.local/lib/python3.8/site-packages/prefect/client/orion.py", line 1313, in create_deployment
response = await <http://self._client.post|self._client.post>(
File "/home/youval/.local/lib/python3.8/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/home/youval/.local/lib/python3.8/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/home/youval/.local/lib/python3.8/site-packages/prefect/client/base.py", line 251, in send
response.raise_for_status()
File "/home/youval/.local/lib/python3.8/site-packages/httpx/_models.py", line 745, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '422 Unprocessable Entity' for url '<https://api.prefect.cloud/api/accounts>
$ jobs
[1]+ Running nohup prefect agent start -q 'aws2' > ~/tmp/prefect_agent.log & (wd: ~)
Nate
01/07/2023, 11:57 PMrun_collect_stocks_data-deployment.yaml
file directly or are you just applying what the build command produced?YD
01/08/2023, 1:00 AMprefect deployment build ../weekly_data_collection_only.py:run_collect_stocks_data -q aws2 --tag AWS --name yquark_deployment --skip-upload
prefect deployment apply run_collect_stocks_data-deployment.yaml
Nate
01/08/2023, 1:08 AMAndrew Huang
01/08/2023, 1:09 AMyquark-deployment
YD
01/08/2023, 1:13 AM$ rm run_collect_stocks_data-deployment.yaml
$ prefect deployment build ../weekly_data_collection_only.py:run_collect_stocks_data -q aws2 --tag AWS --name yquark_deployment --skip-upload
Found flow 'Weekly data collection only'
Deployment YAML created at '.../run_collect_stocks_data-deployment.yaml'.
$ prefect deployment apply run_collect_stocks_data-deployment.yaml
Successfully loaded 'yquark_deployment'
Traceback (most recent call last):
File "/home/youval/.local/lib/python3.8/site-
...
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '422 Unprocessable Entity' for url '<https://api.prefect.cloud/api/accounts>
Andrew Huang
01/08/2023, 1:14 AM--name yquark_deployment
to clarify, can you replace the underscore with hyphen?YD
01/08/2023, 1:23 AM"yquark-deployment"
and try again$ rm run_collect_stocks_data-deployment.yaml
$ prefect deployment build ../weekly_data_collection_only.py:run_collect_stocks_data -q aws2 --tag AWS --name "yquark-deployment" --skip-upload
Found flow 'Weekly data collection only'
Deployment YAML created at '.../run_collect_stocks_data-deployment.yaml'.
$ prefect deployment apply run_collect_stocks_data-deployment.yaml
Successfully loaded 'yquark-deployment'
Traceback (most recent call last):
File "~/.local/lib/python3.8/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "~/.local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py"
--name yquark
but this did not help either$ pip3 install -U prefect==2.7.6
and run the same commands
and it worked fine
so I think the issue is with the 2.7.7 versionedpoint
path for the deployment to runJeff Hale
01/08/2023, 2:30 AM(zoom) jeffhale demos/docker $ prefect deployment build flows/flows.py:do -n dockt -ib docker-container/doit -a
Found flow 'do'
Deployment YAML created at
'/Users/jeffhale/Desktop/prefect/demos/docker/do-deployment.yaml'.
Deployment storage None does not have upload capabilities; no files
uploaded. Pass --skip-upload to suppress this warning.
Traceback (most recent call last):
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 230, in coroutine_wrapper
return run_async_in_new_loop(async_fn, *args, **kwargs)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 181, in run_async_in_new_loop
return anyio.run(partial(__fn, *args, **kwargs))
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run
return asynclib.run(func, *args, **backend_options)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run
return native_run(wrapper(), debug=debug)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
return await func(*args)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/cli/deployment.py", line 966, in build
deployment_id = await deployment.apply()
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/deployments.py", line 633, in apply
deployment_id = await client.create_deployment(
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/client/orion.py", line 1313, in create_deployment
response = await <http://self._client.post|self._client.post>(
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/prefect/client/base.py", line 251, in send
response.raise_for_status()
File "/Users/jeffhale/miniforge3/envs/zoom/lib/python3.9/site-packages/httpx/_models.py", line 749, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '422 Unprocessable Entity' for url '<https://api.prefect.cloud/api/accounts/cbad165a-7057-416a-bb31-a0aab3f1d0cf/workspaces/a575bdc0-4dcc-4ad4-b286-3639c7077307/deployments/>'
For more information check: <https://httpstatuses.com/422>
(zoom) jeffhale demos/docker $ prefect version
Version: 2.7.7
API version: 0.8.4
Python version: 3.9.15
Git commit: e8ca30b8
Built: Fri, Jan 6, 2023 4:25 PM
OS/Arch: darwin/arm64
Profile: jeffmshale
Server type: cloud
Nate
01/08/2023, 4:34 AM