on Azure Machine Learning studio I am running a python notebook, I have issues acceding the files. Even the simple path doesn't work. When I put all of files in the same directory it works

Kike2023 0 Reputation points
2023-08-23T16:35:54.45+00:00

User's image

As you can see if I run in line 3, it works, but If I run from line 2 it doesn't work, it says "File not found"

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,334 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,015 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 48,906 Reputation points Microsoft Employee Moderator
    2023-08-24T08:23:31.0233333+00:00

    @Kike2023 I think it is most likely that you have not created a folder called Image relative to your notebook file path. Try to create one using the option shown and then retry the same with the images in the Image folder.

    User's image

    Also check if you can pass the path of each image to display.

    import glob
    from IPython.display import display, Image
    
    def display_image(path):
        print("File: {}".format(path))
        display(Image(path))
    
    for path in glob.iglob('Image/*')
        display_image(path)
    
    
    

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.