```Traceback (most recent call last): File "/mnt...
# flytekit
c
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
what was the command that generated this? is that folder supposed to be there?
c
@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
@cryptic, are you running this on WSL? (just out of curiousity - it should be supported)
c
Yes
e
and can you share the test you're seeing this?
c
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
@cryptic, will take a look and reply in ~1h
@cryptic, how are you running this test?
c
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
oh, you should be able to use
pytest
c
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
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
@Eduardo Apolinario (eapolinario) Do you mean in the ctx.file_access.put_data() ? (https://github.com/flyteorg/flytekit/pull/1243/files#diff-acc8fe599e24131a8293a575d365a1e2c817b953c8f246f81fe609652d00adacR55)
e
yes, I mean to specify the path to the local file you wrote in lines 51-52
155 Views