From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: odd/unexpected behavior with Python src blocks Date: Sun, 28 Sep 2014 21:27:29 -0400 Message-ID: <87oatzkygu.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYPlk-0004Co-29 for emacs-orgmode@gnu.org; Sun, 28 Sep 2014 21:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYPld-0004Pu-Le for emacs-orgmode@gnu.org; Sun, 28 Sep 2014 21:28:51 -0400 Received: from mail-qa0-f51.google.com ([209.85.216.51]:40580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYPld-0004EF-Hn for emacs-orgmode@gnu.org; Sun, 28 Sep 2014 21:28:45 -0400 Received: by mail-qa0-f51.google.com with SMTP id k15so283007qaq.38 for ; Sun, 28 Sep 2014 18:27:33 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin , emacs-orgmode@gnu.org Hi John, 2014ko irailak 28an, John Kitchin-ek idatzi zuen: [...] > I am not sure why this happens, but it seems like incorrect behavior to > me. In the first case, python exits with a non-zero exit code, whereas in the second it exits with a zero code (i.e. successful exit), and prints the matrix-thing [[1.], [1.]] to stdout. It looks like scipy traps the NameErrors and prints them to stderr, but continues its computation regardless. I=E2=80=99d say babel is performing as desired here, but scipy sadly isn=E2= =80=99t reporting its errors in the standard way (by a nonzero exit, which I think would happen automatically if the NameErrors made it to the top level of the stack without being caught). --=20 Aaron Ecay