It’s my first time and i’m new to dash and python, so my problem is when i upload a data set and save it with csv extension while running my dash interface. I want to import from the folder wher i save it in an other tab or script so i can work with it but the problem is that i can t so i check the error and it say file not found but when i go to the folder i find it. I don’t know how i can resolve this problème .Thank you guys or helping me.
Welcome @hamzamsf! File paths can be tricky in Python, a couple of things come to mind.
Are you using an absolute or relative path to the file? If you’re using a relative path, Python might not be starting from where you think it is. You can check this with:
import os print(os.getcwd())
Are the extension and case of the file exactly right? Once you’ve found the correct folder, you can see exactly what the files & subfolders in it are called with something like:
print('\n'.join(os.listdir('.'))) # replace '.' with your target folder
Thank you @alexcjohnson for your reply , i don’t think that the problem is the path because when i reload my script It s work. I think that there s no interactivity with dash and the folder for exemple if i add something or i removed it. they will be no change .
it keeps the first stats of the folder before i run the code
Hmm OK, so not a path problem. I’ve never seen a file system behave that way, in fact we depend on being able to detect changed files for hot reloading (part of the
debug mode dev tools). Not sure what else to suggest, but if you want to post the full error message & relevant app code we can see if something pops out.
hello again finally i found a solution and its to add in parameter off run the extra_files like this app.run(debug=True,extra_files=folder) ,so that it can detect the changement in my folder
Thank you for your response