Brian Mesick
03/09/2021, 8:30 PMBrian Mesick
03/09/2021, 8:30 PMfrom prefect import context
…
logger = context.get("logger")
in a task seems to cause that task to not serialize while
import prefect
…
logger = prefect.context.get("logger")
worksBrian Mesick
03/09/2021, 8:31 PMMariia Kerimova
03/09/2021, 9:26 PMprefect.context
I believe you should see a warning in the trace, it looks like this:
TypeError: Pickling context objects is explicitly not supported. You should always access context as an attribute of the `prefect` module, as in `prefect.context`
Brian Mesick
03/09/2021, 9:32 PMBrian Mesick
03/09/2021, 9:32 PMBrian Mesick
03/09/2021, 9:33 PMMariia Kerimova
03/09/2021, 10:00 PMMariia Kerimova
03/09/2021, 10:01 PMBrian Mesick
03/09/2021, 10:01 PM