Côme Arvis
01/18/2022, 11:57 AMUnexpected error: AttributeError("partially initialized module 'prefect' has no attribute 'schedules' (most likely due to a circular import)")
during our flows executions.
This seems to occur randomly between tasks executions.
Is there some known issue about it? Thanks!Unexpected error: AttributeError("partially initialized module 'prefect' has no attribute 'schedules' (most likely due to a circular import)")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/flow_runner.py", line 643, in get_flow_run_state
final_states = executor.wait(
File "/usr/local/lib/python3.8/dist-packages/prefect/executors/dask.py", line 440, in wait
return self.client.gather(futures)
File "/usr/local/lib/python3.8/dist-packages/distributed/client.py", line 1980, in gather
return self.sync(
File "/usr/local/lib/python3.8/dist-packages/distributed/client.py", line 868, in sync
return sync(
File "/usr/local/lib/python3.8/dist-packages/distributed/utils.py", line 332, in sync
raise exc.with_traceback(tb)
File "/usr/local/lib/python3.8/dist-packages/distributed/utils.py", line 315, in f
result[0] = yield future
File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/usr/local/lib/python3.8/dist-packages/distributed/client.py", line 1845, in _gather
raise exception.with_traceback(traceback)
File "/usr/local/lib/python3.8/dist-packages/distributed/protocol/pickle.py", line 75, in loads
return pickle.loads(x)
File "/usr/local/lib/python3.8/dist-packages/prefect/__init__.py", line 9, in <module>
import prefect.triggers
File "/usr/local/lib/python3.8/dist-packages/prefect/triggers.py", line 48, in <module>
from prefect.engine import signals
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/__init__.py", line 7, in <module>
from prefect.engine.flow_runner import FlowRunner
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/flow_runner.py", line 15, in <module>
from prefect.core import Edge, Flow, Task
File "/usr/local/lib/python3.8/dist-packages/prefect/core/__init__.py", line 4, in <module>
from prefect.core.flow import Flow
File "/usr/local/lib/python3.8/dist-packages/prefect/core/flow.py", line 85, in <module>
class Flow:
File "/usr/local/lib/python3.8/dist-packages/prefect/core/flow.py", line 159, in Flow
schedule: prefect.schedules.Schedule = None,
AttributeError: partially initialized module 'prefect' has no attribute 'schedules' (most likely due to a circular import)
Anna Geller
01/18/2022, 11:59 AMCôme Arvis
01/18/2022, 12:08 PMprefect.py
or prefect
in our project thoughAnna Geller
01/18/2022, 12:11 PMCôme Arvis
01/18/2022, 12:24 PM{
"config_overrides": {},
"env_vars": [],
"system_information": {
"platform": "macOS-10.16-x86_64-i386-64bit",
"prefect_backend": "cloud",
"prefect_version": "0.15.9",
"python_version": "3.8.5"
}
}
I’m not sure to be able to easily provide a minimal reproductible flow to leads to this error though, is that mandatory?Anna Geller
01/18/2022, 12:28 PMCôme Arvis
01/18/2022, 2:28 PMAnna Geller
01/18/2022, 2:47 PM