https://prefect.io logo
Title
k

Kishan

11/29/2022, 3:21 AM
Im having issues with executing a flow run from the Prefect UI (local server) deployment. I can execute a deployment from python successfuly, but for some reason can't from the UI (it says the flow crashed). Below is the error I am getting. It looks like it is not able to retrieve the flow from the storage block. I got the error before setting up any storage block then I setup a GCS storage block and I'm still getting the same error. Any thoughts here?
Starting 'ConcurrentTaskRunner'; submitted tasks will be run concurrently...
10:18:46 PM
Crash detected! Execution was interrupted by an unexpected exception: TypeError: object NoneType can't be used in 'await' expression
10:18:46 PM
Crash details:
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/engine.py", line 1332, in report_flow_run_crashes
    yield
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/engine.py", line 357, in begin_flow_run
    flow_run_context.result_factory = await ResultFactory.from_flow(
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/results.py", line 161, in from_flow
    return await cls.default_factory(
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/results.py", line 123, in default_factory
    return await cls.from_settings(**kwargs, client=client)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/results.py", line 229, in from_settings
    storage_block_id, storage_block = await cls.resolve_storage_block(
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/results.py", line 257, in resolve_storage_block
    or await storage_block._save(is_anonymous=True, overwrite=True)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/prefect/blocks/core.py", line 751, in _save
    await self.register_type_and_schema(client=client)
TypeError: object NoneType can't be used in 'await' expression
k

Khuyen Tran

11/29/2022, 4:43 PM
Can you show the example of your flow code?