[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Problem with python source block
From: |
Thibault Marin |
Subject: |
Re: [O] Problem with python source block |
Date: |
Sat, 26 May 2018 00:29:45 -0500 |
User-agent: |
mu4e 0.9.18; emacs 25.2.2 |
Hi,
For what it's worth, I cannot reproduce it on Org mode version 9.1.13
(release_9.1.13-763-g2621db) with -Q; the file is properly produced.
I get the same error if I add the `session' header argument, maybe it is
set elsewhere?
Hope it helps.
thibault
Doyley, Marvin M. writes:
> Hi there,
>
> When I run the following code I get an error, does anybody know how to fix
> this
>
> I am using the latest version of org-mode.
>
> Thanks,
> M
>
>
> #+BEGIN_SRC python :results file
> import numpy as np
> import matplotlib.pyplot as plt
> import seaborn as sns
> x = np.random.rand(100)
> y= np.cos(x)
> plt.plot(x,y)
> plt.savefig('test.png')
> return 'test.png'
> #+END_SRC
>
> #+RESULTS:
> [[file: File "Org SRC", line 8
> return 'test.png'
> ^
> SyntaxError: 'return' outside function
> ]]