We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
right now, this can't work.
from flytekit import task, workflow from flytekit.types.file import FlyteFile @task def create_ff() -> FlyteFile: full_s3_path = "s3://my-s3-bucket/test.json" ff = FlyteFile(full_s3_path) with open(ff, "r") as f: content = f.read() print(content) print(type(content)) return ff
This should work.
Error message
/Users/future-outlier/miniconda3/envs/dev/bin/python /Users/future-outlier/code/dev/flytekit/build/dataclass_remote_api/json_example.py 23:05:24.489138 INFO file.py:252 - Using flytectl/YAML config /Users/future-outlier/.flyte/config-sandbox.yaml 23:05:26.822284 INFO utils.py:344 - AsyncTranslate literal to python value. [Time: 0.000002s] 23:05:26.823714 INFO utils.py:344 - Translate literal to python value. [Time: 0.001452s] 23:05:26.824123 INFO base_task.py:751 - Invoking json_example.create_ff with inputs: {} 23:05:26.824461 INFO utils.py:344 - Execute user level code. [Time: 0.000017s] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /Users/future-outlier/code/dev/flytekit/build/dataclass_remote_api/json_exam │ │ ple.py:32 in <module> │ │ │ │ ❱ 32 │ wf() │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/workflow.py:308 in │ │ __call__ │ │ │ │ ❱ 308 │ │ │ raise exc │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/workflow.py:301 in │ │ __call__ │ │ │ │ ❱ 301 │ │ │ return flyte_entity_call_handler(self, *args, **input_kwar │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/promise.py:1459 in │ │ flyte_entity_call_handler │ │ │ │ ❱ 1459 │ │ │ result = cast(LocallyExecutable, entity).local_execute(ch │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/workflow.py:327 in │ │ local_execute │ │ │ │ ❱ 327 │ │ function_outputs = self.execute(**kwargs_literals) │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/workflow.py:829 in │ │ execute │ │ │ │ ❱ 829 │ │ return self._workflow_function(**kwargs) │ │ │ │ /Users/future-outlier/code/dev/flytekit/build/dataclass_remote_api/json_exam │ │ ple.py:27 in wf │ │ │ │ ❱ 27 │ ff = create_ff() │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/base_task.py:364 in │ │ __call__ │ │ │ │ ❱ 364 │ │ return flyte_entity_call_handler(self, *args, **kwargs) # typ │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/promise.py:1451 in │ │ flyte_entity_call_handler │ │ │ │ ❱ 1451 │ │ │ return cast(LocallyExecutable, entity).local_execute(ctx, │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/base_task.py:341 in │ │ local_execute │ │ │ │ ❱ 341 │ │ │ outputs_literal_map = self.sandbox_execute(ctx, input_lite │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/base_task.py:421 in │ │ sandbox_execute │ │ │ │ ❱ 421 │ │ return self.dispatch_execute(ctx, input_literal_map) │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/base_task.py:754 in │ │ dispatch_execute │ │ │ │ ❱ 754 │ │ │ │ │ native_outputs = self.execute(**native_inputs) │ │ │ │ /Users/future-outlier/code/dev/flytekit/flytekit/core/python_function_task.p │ │ y:204 in execute │ │ │ │ ❱ 204 │ │ │ return self._task_function(**kwargs) │ │ │ │ /Users/future-outlier/code/dev/flytekit/build/dataclass_remote_api/json_exam │ │ ple.py:10 in create_ff │ │ │ │ ❱ 10 │ with open(ff, "r") as f: │ ╰──────────────────────────────────────────────────────────────────────────────╯ FileNotFoundError: [Errno 2] No such file or directory: 's3://my-s3-bucket/test.json' Process finished with exit code 1
No response
The text was updated successfully, but these errors were encountered:
#take
Sorry, something went wrong.
JiangJiaWei1103
Successfully merging a pull request may close this issue.
Describe the bug
right now, this can't work.
Expected behavior
This should work.
Additional context to reproduce
Error message
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: