On Mon, May 25, 2015 at 8:30 PM, John Kitchin wrote: > With emacs -Q, and this org file: > > #+BEGIN_SRC emacs-lisp > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) > (python . t))) > #+END_SRC > > #+RESULTS: > > #+BEGIN_SRC python :session with_matplotlib :results file :exports both > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as plt > fig=plt.figure(figsize=(3,2)) # 4 > plt.plot([1,3,2]) # 3 > plt.savefig('myfig.png') # 2 > 'myfig.png' # 1 > #+END_SRC > > #+RESULTS: > [[file:myfig.png]] > > As I mentioned before, if I evaluate the second block as-is I get the error. However, if I comment out all the lines except #1 then the code returns the correct results block. Then, I started to add the numbered lines. Adding #2 and #3 still doesn't break the behavior. Once adding line #4 the behavior breaks. Maybe this observation can be helpful? This happens both when starting Emacs -Q or without -Q.