Traceback (most recent call last):
File "/usr/local/lib/python3.12/pathlib.py", line 441, in __str__
return self._str
^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute '_str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/pathlib.py", line 555, in drive
return self._drv
^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute '_drv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/.venv/lib/python3.12/site-packages/flytekit/bin/entrypoint.py", line 164, in _dispatch_execute
task_def = load_task()
^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/bin/entrypoint.py", line 583, in load_task
return resolver_obj.load_task(loader_args=resolver_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/utils.py", line 312, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/python_auto_container.py", line 271, in load_task
task_module = importlib.import_module(name=task_module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 999, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/workflows/pipeline.py", line 9, in <module>
@task()
^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/task.py", line 359, in wrapper
task_instance = TaskPlugins.find_pythontask_plugin(type(task_config))(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 82, in __call__
o = super(InstanceTrackingMeta, cls).__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/python_function_task.py", line 139, in __init__
name, _, _, _ = extract_task_module(task_function)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 382, in extract_task_module
mod_name = get_full_module_path(mod, mod_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 391, in get_full_module_path
new_mod_name = _mod_sanitizer.get_absolute_module_name(inspect.getabsfile(mod), package_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 328, in get_absolute_module_name
return self._resolve_abs_module_name(path, package_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 318, in _resolve_abs_module_name
mod_name = self._resolve_abs_module_name(dirname, package_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 318, in _resolve_abs_module_name
mod_name = self._resolve_abs_module_name(dirname, package_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 318, in _resolve_abs_module_name
mod_name = self._resolve_abs_module_name(dirname, package_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 964 more times]
File "/.venv/lib/python3.12/site-packages/flytekit/core/tracker.py", line 294, in _resolve_abs_module_name
if not Path(dirname).is_dir():
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 875, in is_dir
return S_ISDIR(self.stat().st_mode)
^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 840, in stat
return os.stat(self, follow_symlinks=follow_symlinks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 448, in __fspath__
return str(self)
^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 443, in __str__
self._str = self._format_parsed_parts(self.drive, self.root,
^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 557, in drive
self._load_parts()
File "/usr/local/lib/python3.12/pathlib.py", line 415, in _load_parts
drv, root, tail = self._parse_path(path)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 395, in _parse_path
drv, root, rel = cls._flavour.splitroot(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
RecursionError: maximum recursion depth exceeded
Describe the bug
I am currently trying out Flyte and trying to run a local kubernetes cluster.
To include all dependencies that are needed for our workflows and reuse our package-manager (uv) I am creating my own docker image (Dockerfile attached below) that is supposed to be used for the workflow. I created an example workflow that is running fine without the
--remoteflag, but produces aMaximum recursion depth exceedederror when running with the flag.workflows/pipeline.pyDockerfileTraceback:
Details
Trace:Message:
Expected behavior
Execution of the workflow should work without the
--remoteflag as well as with it.Additional context to reproduce
docker build --tag localhost:30000/toy-pipeline:latest .docker push localhost:30000/toy-pipeline:latest--remote:pyflyte run --image localhost:30000/toy-pipeline:latest -p toy-pipeline -d development workflows/pipeline.py pipelineflytectl demo start--remote-flag:pyflyte run --image localhost:30000/toy-pipeline:latest --remote -p toy-pipeline -d development workflows/pipeline.py pipelineScreenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?