Execution failure from change in working directory
See original GitHub issueOne more issue relating to 0.6->0.7. One of my notebooks loads in a local data file, which lives in the same path as the notebooks, eg
content/chapter3/section.ipynb
content/chapter3/file.dat
The executor now fails when run from the top-level directory because it can’t find the file in the local path. (FileNotFoundError)
I’d prefer to not hard-code the path into the notebook, and expect that the working directory should change to reflect the path of the notebook during execution.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How To Fix R Error cannot change working directory
What is causing this problem? The “cannot change working directory” error message is caused by an operating system not recognizing “~/” as indicating...
Read more >R Error in setwd() : cannot change working directory (2 ...
The reason for this is that the directory we are trying to access does not exist. We might have specified the folder name...
Read more >How to Fix in R: cannot change working directory
The easiest way to fix this error is to change the file path to point to the correct folder:.
Read more >How to fix Error in setwd("D:/") when opening R
It looks like I still get Error in setwd("D:/") : cannot change working directory Execution halted when trying to run Knit .
Read more >Error in setwd(mainDir) : cannot change working directory
The issue can be resolved by granting Read & execute permissions to ALL APPLICATION PACKGES to the folder you are trying to change...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok cool - I think I figured out the bug (https://github.com/executablebooks/MyST-NB/issues/180)
OK, I’m documenting how this works with execution and relative paths here: #711 and we can track the addition of relative paths when using
cache
as a future enhancement 👍