Here's my setup:

* Tramp on remote
:header-args: :dir /ssh:me@server.com|ssh:me@remote:/project/

#+BEGIN_SRC ipython :session :results output drawer
import pandas as pd
data = pd.read_csv('/project/path/to/file/data.txt')

When I run the code, tramp complains that the file '/project/path/to/file/data.txt' does not exist.

FileNotFoundError: [Errno 2] No such file or directory:

However, the file does exist on the remote, and if I switch to the org-babel session and type in the commands directly, then I don't get any errors.

Does anyone know what could be happening here?

  • Are you sure Tramp complains about /project/path/to/file/data.txt? This path is in your python script; Tramp has no access to this script. Furthermore, the error message FileNotFoundError does not look like originated from Tramp. – Michael Albinus Apr 7 '17 at 11:06
  • Tramp does not complain. Python does. But that only happens when I eval the src_block with a :dir argument that requires Tramp. If I switch to the session with C-c C-v C-z, and paste the code directly on the remote interpreter session, the FileNotFoundError doesn't happen. – dangom Apr 7 '17 at 11:10
  • So I cannot help. Somebody shall debug ob-ipython.el. – Michael Albinus Apr 7 '17 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.