2

I have 2 notebooks under the root folder in my workspace. Calling one notebook from the other with %run magic cmd returns error saying file path not found. This is my command:

%run /Users/name@comp.com/notebookB $arg1=val1 $arg2=val2
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
sotn
  • 1,833
  • 5
  • 35
  • 65

2 Answers2

8

Found the solution, turns out the run command needs to be in a cell all by itself - no other code and no comments. I have seen some solutions online say that the cell should not contain any comments, but turns out it should not contain any other code either.

sotn
  • 1,833
  • 5
  • 35
  • 65
0

It's really better to use relative names instead of absolute (starting with /):

  • If both notebooks are in the same folder, then you can refer to another using syntax ./notebook_name
  • If another is in the folder above, then use ../notebook_name
  • if another is in the subfolder, then use subfolder/notebook_name
Alex Ott
  • 80,552
  • 8
  • 87
  • 132