Open JonatanSahar opened 6 months ago
Hi this could be a problem with your python emacs configuration..
But it also could be that you are using "ipython" as a header arg. Usually the babel language is "python", and you can set the interactive session shell to be ipython. This usually is done in your configuration where the "python-shell-interpreter" variable gets set to ipython to provide a nicer REPL.
Other ideas: You could try to have a look at the buffer "py-1" that should have been started in emacs for the session. Emacs executes the commands there and then reads/parses the output back (and that is where the sentinel comes into play. It's the mechanism by which emacs checks for changes in the session buffer). If the session buffer does not exist, it probably already fails when trying to start your ipython session.
When you are in the org buffer from which you execute, check from where it gets the executable it by doing in the buffer
M-s ! which ipython
This is at least how I would start to debug the thing.
Thanks for looking into it! I have been setting my header to ipython.. Having changed it I'm getting a fatal error from ob-ipython, with the following in the debug buffer (sorry for all the formatting garbage):
[0;31m---------------------------------------------------------------------------[0m [0;31mOSError[0m Traceback (most recent call last) File [0;32m~/.config/emacs/.local/straight/repos/ob-ipython/client.py:60[0m [1;32m 57[0m parser[38;5;241m.[39madd_argument([38;5;124m'[39m[38;5;124m--complete[39m[38;5;124m'[39m, action[38;5;241m=[39m[38;5;124m'[39m[38;5;124mstore_true[39m[38;5;124m'[39m) [1;32m 58[0m args [38;5;241m=[39m parser[38;5;241m.[39mparse_args() [0;32m---> 60[0m c [38;5;241m=[39m [43mcreate_client[49m[43m([49m[43margs[49m[38;5;241;43m.[39;49m[43mconn_file[49m[43m)[49m [1;32m 62[0m [38;5;28;01mwith[39;00m interested_lock: [1;32m 63[0m [38;5;28;01mif[39;00m args[38;5;241m.[39mexecute:
File [0;32m~/.config/emacs/.local/straight/repos/ob-ipython/client.py:43[0m, in [0;36mcreate_client[0;34m(name)[0m [1;32m 41[0m cf [38;5;241m=[39m find_connection_file(name) [1;32m 42[0m [38;5;28;01melse[39;00m: [0;32m---> 43[0m cf [38;5;241m=[39m [43mfind_connection_file[49m[43m([49m[38;5;124;43m'[39;49m[38;5;124;43memacs-[39;49m[38;5;124;43m'[39;49m[43m [49m[38;5;241;43m+[39;49m[43m [49m[43mname[49m[43m)[49m [1;32m 44[0m c [38;5;241m=[39m client[38;5;241m.[39mBlockingKernelClient(connection_file[38;5;241m=[39mcf) [1;32m 45[0m c[38;5;241m.[39mload_connection_file()
File [0;32m~/miniforge3/lib/python3.10/site-packages/jupyter_client/connect.py:233[0m, in [0;36mfind_connection_file[0;34m(filename, path, profile)[0m [1;32m 231[0m [38;5;28;01mif[39;00m [38;5;129;01mnot[39;00m matches: [1;32m 232[0m msg [38;5;241m=[39m [38;5;124mf[39m[38;5;124m"[39m[38;5;124mCould not find [39m[38;5;132;01m{[39;00mfilename[38;5;132;01m!r}[39;00m[38;5;124m in [39m[38;5;132;01m{[39;00mpath[38;5;132;01m!r}[39;00m[38;5;124m"[39m [0;32m--> 233[0m [38;5;28;01mraise[39;00m [38;5;167;01mOSError[39;00m(msg) [1;32m 234[0m [38;5;28;01melif[39;00m [38;5;28mlen[39m(matches) [38;5;241m==[39m [38;5;241m1[39m: [1;32m 235[0m [38;5;28;01mreturn[39;00m matches[[38;5;241m0[39m]
[0;31mOSError[0m: Could not find 'emacs-none' in ['.', '/home/yonatan/.local/share/jupyter/runtime']
Looks like it can't find a kernel to connect to?
I've tried setting ob-ipython-command
to ipython
instead of jupyter
but that didn't help..
Hi! I'm getting:
when trying to run a simple code block with ipython.
I have
#+PROPERTY: header-args:ipython :session py-1
as a header.