1

I imagine this has been answered, but I could not find.

I am attempting to use:

with open('file:///absolute/path/to/file') as fn:
     csv-stuff

however, I am getting Error :

"[Errno 2] No such file or directory: 'file:///absolute/path/to/file'"

The absolute file path is being generated within the following commands from os and mlflow:

data_uri = os.path.join(run.info.artifact_uri, "data")

where "data" was logged without a artifact_path specified with:

mlflow.log_artifact(tempfile_path,"data")

I have been stuck on this for a few days and have not figured out the issue yet. Thanks for the help!

P.S. This is my first post, feel free to tell me if I am doing something wrong. Thanks.

G_real
  • 1,137
  • 1
  • 18
  • 28
  • I did not understand the nuances between system path and uri's. I used the second answer submitted in the link from @MihaiChelaru's comment and it worked out. Thanks. – nathan wendt Sep 17 '19 at 21:42
  • No problem. I believe you can accept the duplicate target, which will show others that it solved your problem and turn this question into a signpost for the other question. I thought about writing up a solution in this case, but I realized there are other nuances in these URIs such as URI-escaped characters that need to be handled. Glad you were able to make it work with their solution! – Mihai Chelaru Sep 17 '19 at 22:06

0 Answers0