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 16:39:00 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_6F4B811D-6B30-4028-AEC1-23ADAA4E77FA"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMcDk-00060A-Vh for emacs-orgmode@gnu.org; Sat, 26 May 2018 12:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMcDg-0000D6-0W for emacs-orgmode@gnu.org; Sat, 26 May 2018 12:39:08 -0400 Received: from mail-by2nam03on0126.outbound.protection.outlook.com ([104.47.42.126]:8608 helo=NAM03-BY2-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 1fMcDf-0000Bi-G3 for emacs-orgmode@gnu.org; Sat, 26 May 2018 12:39:03 -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: "emacs-orgmode@gnu.org" --Apple-Mail=_6F4B811D-6B30-4028-AEC1-23ADAA4E77FA Content-Type: multipart/alternative; boundary="Apple-Mail=_38DEF414-C43C-4470-94EE-E3DAABDF062B" --Apple-Mail=_38DEF414-C43C-4470-94EE-E3DAABDF062B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thanks John, The problem is now fixed cheers, M > On May 26, 2018, at 10:22 AM, Doyley, Marvin M. = wrote: >=20 > Hi there, >=20 > The problem seem to be cause by scimax-org-babel-python.el. > When I disable this works fine, but doing this disables asynchronous = execution. >=20 > John do you have any suggestions what is going on ? >=20 > Cheers, > M >=20 >> On May 26, 2018, at 9:16 AM, Doyley, Marvin M. = > wrote: >>=20 >>=20 >> Hi Thibault, >> thanks for the info. I will dig around my config >> cheers, >> M >>=20 >>=20 >> > Hi, >>=20 >> > 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? >>=20 >> >Hope it helps. >>=20 >> >thibault >>=20 >> >Doyley, Marvin M. writes: >>=20 >> > 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 =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 >> > ]] >>=20 >>=20 >> I will do some digging around in my config file. >=20 --Apple-Mail=_38DEF414-C43C-4470-94EE-E3DAABDF062B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Thanks John,

The = problem is now fixed

cheers,
M
On May 26, 2018, at 10:22 AM, = Doyley, Marvin M. <m.doyley@rochester.edu> wrote:

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 = 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 =
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 =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.


= --Apple-Mail=_38DEF414-C43C-4470-94EE-E3DAABDF062B-- --Apple-Mail=_6F4B811D-6B30-4028-AEC1-23ADAA4E77FA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEwFvnpiA2mP2E6pbdFtmzX5oWlpcFAlsJjaMACgkQFtmzX5oW lpe6Tw//WuOBjqMulqXPwzuUIrbD1RapNyBkrCvBJPrwuHFmL2k9UVosocRcbfum cPblNxYGz5JoSW6IqWj4P0Hc/IZmCSBIc7nvDUTCH1eVvMK6FgZtqQfqe8DxfML/ tSJW1feqGYf1TGFm1pOL1taYmmGr4EwpFznotlGEiPRlqI0VdV9KKHiORQyt3NOq ATBc4gQt0IcOCqSqtM9vQwCRrSn8xqE/2a8Y4m4gLRuyQ49SAskmV1xAmlrc3EDV LYql+qy2Qd2cp4mLFoct4zNZDfzFa8n8lleOFFpS5PsGtDCiaEce3l2gxnQJt+5c QDNFNahTPSQ3yIvmaqRmC0NN0euTwlJnak+8ldoeaDA8z7Q/71Wx2vtHVabB1Fvu Ak59XD2KbnO0DfJorZv8vr65j1QQMCoaQajZtFJiQ1Xl8bxA7hSTNztjJYY3EWcQ 5/P0zV9/DorTzY64TrbHZ6E7ACLKGdpABReMItLDTzoZpcHKXNIWPkHDOkIIQ4Rz oi6FbRtIdFC7sg8hwcaAj/zd2wboxnJwGEENZzJiRUkfLxSb5YA2SAzDEBVUP7Jo QGvZ/cn/aa+9y8dEupPzsfGHO8l9xdKBslG96N+Rvj/jwFEuzlhkFMEd4rxBPwLo 7QUGZrH88UJid59SbtjAA3eU1izkAgms9gKLI8BrTwWSl6+R6sw= =YFQJ -----END PGP SIGNATURE----- --Apple-Mail=_6F4B811D-6B30-4028-AEC1-23ADAA4E77FA--