-
-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
When setting the :dir header argument, it looks like the path is being expanded twice.
For example the following block run in a file in /home/notebook
#+BEGIN_SRC jupyter-python :dir src
print("hi")
#+END_SRC
will result in the error
FileNotFoundErrorTraceback (most recent call last)
<ipython-input-1-1028f0c44f21> in <module>
1 import os
2 __JUPY_saved_dir = os.getcwd()
----> 3 os.chdir("/home/notebook/src/src")
4 try:
5 get_ipython().run_cell("""%load_ext autoreload
FileNotFoundError: [Errno 2] No such file or directory: '/home/notebook/src/src'
It appears this is due to org changing default-directory before org-babel-expand-body:jupyter is called so then (expand-file-name dir) is expanding again. As a patch I just replaced that call with default-directory and it works.
Metadata
Metadata
Assignees
Labels
No labels