Relative Content

Tag Archive for pythonpath

The file-related error and a kind of abnormal thing

So I am running the start of a ML code, but it returns like this:
FileNotFoundError: [Errno 2] No such file or directory: ‘C:/Users/User/.spyder-py3/isic2019/ISIC_2019_Test_InputISIC_0026756’
I was thinking at that time: why double ? and why my filename, which is supposed to be an .jpg file, is not indicated? Any ways to fix this?
Feel free to ask for more info of my project

Unexpected behavior of os.path.join with leading slash

I’ve encountered a peculiar issue with os.path.join. When I add a forward slash (/) in front of the directory variable and pass it to os.path.join, the result is just /Test_directory. However, if I don’t include the forward slash, the full path /home/mvnd3x/Desktop/Test_directory is printed. The same does not happens if I add a forward slash at the end of the parent_directory. Here’s the code I’m working with:

Creating a path for a code in a Jupyter Notebook

I am trying to create a code that will track the X-motion of an object in python. I have the video file saved on my laptop in a folder but when I pull up that folder and I am looking at the path that it shows me in the files tab it has “One Drive” first. Do I need to put the One Drive in my path for the code or do I leave it out? I have been messing around with it and I can’t get the code to work it is saying that the file can’t be found.