gregsexton / gregsexton/ob-ipython

emacs hangs if python block is not executed

Open
#28 14 comments 0 reactions 1 assignee Claimed by @gregsexton View on GitHub
bug
Dominant language
Emacs Lisp
Stars
742
Forks
107
PR merge metrics
No merged PRs in 30d

Description

If I run just an ipython session (example I've used below), I get the following warning and emacs hangs

```
Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "python" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions have been disabled locally.
```

```
#+BEGIN_SRC ipython :session mysession :exports both
def foo(x):
return x + 9

[foo(x) + 7 for x in range(7)]
#+END_SRC
```

However, if I run a python session before that, I get the same warning but emacs doesn't hang and I get results.

```
#+begin_src python :results output :session
print "There are %d hours in a week." % (7*24)
2**10
#+end_src

#+RESULTS:
: Python 2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34)
: [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
: Type "help", "copyright", "credits" or "license" for more information.
: Anaconda is brought to you by Continuum Analytics.
: Please check out: http://continuum.io/thanks and https://binstar.org
: There are 168 hours in a week.
: python.el: native completion setup loaded
: 1024

#+BEGIN_SRC ipython :session mysession :exports both
def foo(x):
return x + 9

[foo(x) + 7 for x in range(7)]
#+END_SRC

#+RESULTS:
: [16, 17, 18, 19, 20, 21, 22]
```

Any idea what is going on here?

Edit - I also get the following message when it hangs : "Shell native completion is disabled, using fallback". I'm using Jupyter v4.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.