From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Doyley, Marvin M." Subject: Re: Problem with python source block Date: Sat, 26 May 2018 14:22:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_BF3245EAE57D4FA19B97144D1D4EFCC4urrochesteredu_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMa5Q-0007Ys-OX for emacs-orgmode@gnu.org; Sat, 26 May 2018 10:22:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMa5M-0007Hn-NA for emacs-orgmode@gnu.org; Sat, 26 May 2018 10:22:24 -0400 Received: from mail-bl2nam02on0131.outbound.protection.outlook.com ([104.47.38.131]:58521 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fMa5M-0007Gs-6p for emacs-orgmode@gnu.org; Sat, 26 May 2018 10:22:20 -0400 In-Reply-To: Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Doyley, Marvin M." Cc: "emacs-orgmode@gnu.org" --_000_BF3245EAE57D4FA19B97144D1D4EFCC4urrochesteredu_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi there, The problem seem to be cause by scimax-org-babel-python.el. When I disable this works fine, but doing this disables asynchronous execut= ion. John do you have any suggestions what is going on ? Cheers, M On May 26, 2018, at 9:16 AM, Doyley, Marvin M. > wrote: Hi Thibault, thanks for the info. I will dig around my config cheers, M > 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 i>t 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 fi= x > 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 =3D np.random.rand(100) > y=3D 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 > ]] I will do some digging around in my config file. --_000_BF3245EAE57D4FA19B97144D1D4EFCC4urrochesteredu_ Content-Type: text/html; charset="us-ascii" Content-ID: <006414C99CF4814A9F689906FED20D7D@namprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable
Hi there,

The problem seem to be cause by scimax-org-babel-python.el.
When I disable this works fine, but doing this disables asy= nchronous execution.

John do you have any suggestions what is going on ?

Cheers,
M

On May 26, 2018, at 9:16 AM, Doyley, Marvin M. <m.doyley@rochester.edu>= ; wrote:


Hi Thibault,
thanks for the info. I will dig around my config 
cheers,
M


> 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 i>=
;t is
>set elsewhere?

>Hope it helps.

>thibault

>Doyley, Marvin M. writes:

> Hi there,
>
> When I run the following code I get an error, does anybo=
dy 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 =3D np.random.rand(100)
> y=3D 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
> ]]


I will do some digging around in my config file.

--_000_BF3245EAE57D4FA19B97144D1D4EFCC4urrochesteredu_--