https://flyte.org logo
#flytekit
Title
# flytekit
c

cryptic

10/23/2022, 4:15 PM
Copy code
Traceback (most recent call last):
  File "/mnt/e/flytekit/flytekit/core/data_persistence.py", line 451, in put_data
    DataPersistencePlugins.find_plugin(remote_path)(data_config=self.data_config).put(
  File "/mnt/e/flytekit/flytekit/core/data_persistence.py", line 239, in put
    copyfile(self.strip_file_header(from_path), self.strip_file_header(to_path))
  File "/usr/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/flyte-0biwpwwf/sandbox/local_flytekit/c553d127c1fe7fff0f9083f3062f41b3'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "tests/flytekit/unit/extras/tensorflow/test_transformations.py", line 69, in <module>
    test_to_python_value_and_literal(TensorflowTensorTransformer(),
  File "tests/flytekit/unit/extras/tensorflow/test_transformations.py", line 56, in test_to_python_value_and_literal
    lv = tf.to_literal(ctx, python_val, type(python_val), lt)  # type: ignore
  File "/mnt/e/flytekit/flytekit/extras/tensorflow/tensor/tensor_transformer.py", line 55, in to_literal
    ctx.file_access.put_data(local_path, remote_path, is_multipart=False)
  File "/mnt/e/flytekit/flytekit/core/data_persistence.py", line 455, in put_data
    raise FlyteAssertion(
flytekit.exceptions.user.FlyteAssertion: Failed to put data from /tmp/flyte-0biwpwwf/sandbox/local_flytekit/c553d127c1fe7fff0f9083f3062f41b3 to /tmp/flyte-0biwpwwf/raw/27e61200733eb79b105950c3e9ee6ed1/c553d127c1fe7fff0f9083f3062f41b3 (recursive=False).

Original exception: [Errno 2] No such file or directory: '/tmp/flyte-0biwpwwf/sandbox/local_flytekit/c553d127c1fe7fff0f9083f3062f41b3'
One of my test is failing
y

Yee

10/23/2022, 8:53 PM
what was the command that generated this? is that folder supposed to be there?
c

cryptic

10/24/2022, 2:54 AM
@Yee I was trying to call one of the functions from my test.py and it errors out. I simply ran python tests.py
e

Eduardo Apolinario (eapolinario)

10/24/2022, 5:37 PM
@cryptic, are you running this on WSL? (just out of curiousity - it should be supported)
c

cryptic

10/24/2022, 5:38 PM
Yes
e

Eduardo Apolinario (eapolinario)

10/24/2022, 5:38 PM
and can you share the test you're seeing this?
c

cryptic

10/24/2022, 5:38 PM
Just a second..
and like it is mentioned the error is when I call the
test_to_python_value_and_literal
@Eduardo Apolinario (eapolinario) Are you able to reproduce the error? Or more appropriate question what is
/tmp/flyte-<>/sandbox/...
probably i'm missing any permissions to create that folder or something like that?
e

Eduardo Apolinario (eapolinario)

10/24/2022, 7:10 PM
@cryptic, will take a look and reply in ~1h
@cryptic, how are you running this test?
c

cryptic

10/25/2022, 4:19 PM
i wrote a main module conditional at the end and simply did python test.py. i didn't know i could use pyflyte. Is the error reproducible ? @Eduardo Apolinario (eapolinario)
e

Eduardo Apolinario (eapolinario)

10/25/2022, 11:43 PM
oh, you should be able to use
pytest
c

cryptic

10/26/2022, 3:52 AM
Yes I did use pytest but i was getting the same error
@Eduardo Apolinario (eapolinario) sorry for repeatedly asking is the error reproducible on the other end?
e

Eduardo Apolinario (eapolinario)

10/26/2022, 4:43 PM
no worries, trying to repro it now in a clean environment. Give me a few minutes.
@cryptic, I left a couple comments on your PR that should unblock you
c

cryptic

10/26/2022, 5:30 PM
@Eduardo Apolinario (eapolinario) Do you mean in the ctx.file_access.put_data() ? (https://github.com/flyteorg/flytekit/pull/1243/files#diff-acc8fe599e24131a8293a575d365a1e2c817b953c8f246f81fe609652d00adacR55)
e

Eduardo Apolinario (eapolinario)

10/26/2022, 5:32 PM
yes, I mean to specify the path to the local file you wrote in lines 51-52
78 Views