question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution failure from change in working directory

See original GitHub issue

One 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
choldgrafcommented, May 20, 2020

ok cool - I think I figured out the bug (https://github.com/executablebooks/MyST-NB/issues/180)

0reactions
choldgrafcommented, Jun 11, 2020

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 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found