Whenever I want to open a file, like a csv, that is right next to the dash script in the same directory, I get a “Not found” error, whereas the same file can be located if I put it instead in my home directory.
How can I force Dash to look in the active directory (that it is running from) when opening files?
Solution: What was actually wrong was that a subprocess call I was making from within Dash was not looking within the active directory, for some reason, even though I was able to make standard import function from function_file.py statements to import from other scripts within the active directory.
I fixed the problem by setting the cwd argument in subprocess.Popen to sys.path[0] (which is what Python’s import looks through), but I guess I need to learn more about how subprocess works.