I'm working on loading a directory containing a bunch of images that I'm going to process. I am using the Azure Notebooks, and I copied the directory correctly by right-clicking + choosing 'Properties', so I don't think that it's an issue to do with how I selected my path. This is what I have tried so far:
import os
data_dir = 'C:\Users\User Name\Downloads\cell_image'
This is a direct copy of the path, but it returns the following Syntax Error: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
I then tried converting the string by putting r in front of it (and by manually adding escape \ characters to the backslashes in the string), and both returned the error shown below.
import os
data_dir = r'C:\Users\User Name\Downloads\cell_image'
os.listdir(data_dir)
This returns the following error: No such file or directory: 'C:\Users\User Name\Downloads\cell_image'
Any thoughts on how to resolve this? It's preventing me from loading my data, so any help that you can give would be amazing. Thanks!