Error during flow deployment

Hello Everyone, Recently I’m facing the JSONDecodeError error when I deploy the flow. It starts happening when we change our plan from Personal to Organization and start using a service account for flow deployment. Just wondering if anyone come across this issue before.

Deployment Command: prefect deployment build -n DEV -sb azure/edw-flow-storage --path DEV -ib docker-container/prefect-edw-flows-dev flows/ -q DEV -a --pool Development

Found flow ‘PowerBI Dataset Refresh’
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/prefect/cli/”, line 41, in wrapper
return fn(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/prefect/utilities/”, line 230, in coroutine_wrapper
return run_async_in_new_loop(async_fn, *args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/prefect/utilities/”, line 181, in run_async_in_new_loop
return, *args, **kwargs))
File “/usr/local/lib/python3.8/dist-packages/anyio/_core/”, line 70, in run
return, *args, **backend_options)
File “/usr/local/lib/python3.8/dist-packages/anyio/_backends/”, line 292, in run
return native_run(wrapper(), debug=debug)
File “/usr/lib/python3.8/asyncio/”, line 44, in run
return loop.run_until_complete(main)
File “/usr/lib/python3.8/asyncio/”, line 616, in run_until_complete
return future.result()
File “/usr/local/lib/python3.8/dist-packages/anyio/_backends/”, line 287, in wrapper
return await func(*args)
File “/usr/local/lib/python3.8/dist-packages/prefect/cli/”, line 898, in build
infrastructure = await Block.load(infra_block)
File “/usr/local/lib/python3.8/dist-packages/prefect/client/”, line 47, in with_injected_client
return await fn(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/prefect/blocks/”, line 714, in load
block_document = await client.read_block_document_by_name(
File “/usr/local/lib/python3.8/dist-packages/prefect/client/”, line 1293, in read_block_document_by_name
return BlockDocument.parse_obj(response.json())
File “/usr/local/lib/python3.8/dist-packages/httpx/”, line 756, in json
return jsonlib.loads(self.text, **kwargs)
File “/usr/lib/python3.8/json/”, line 357, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.8/json/”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.8/json/”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
An exception occurred.

1 Like

Hi @Sohail.Ali, does that service account have collaborator access on the workspace you are deploying the flow to?

edit: I think it’s called developer role now and should be granted on a workspace by workspace basis