From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: [bug] org-sbe: error when passing strings as parameters to/from Python blocks Date: Thu, 14 Mar 2019 13:27:55 +0100 Message-ID: <2019-03-14T13-20-02@devnull.Karl-Voit.at> References: <2019-03-14T09-43-42@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4PSw-0003A3-NG for emacs-orgmode@gnu.org; Thu, 14 Mar 2019 08:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4PSw-00022K-17 for emacs-orgmode@gnu.org; Thu, 14 Mar 2019 08:28:06 -0400 Received: from [195.159.176.226] (port=57674 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h4PSv-00021d-O6 for emacs-orgmode@gnu.org; Thu, 14 Mar 2019 08:28:05 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h4PSu-000f0V-4F for emacs-orgmode@gnu.org; Thu, 14 Mar 2019 13:28:04 +0100 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 Hi Daniel, * Daniel Herzig wrote: > Karl Voit writes: > > After some trying I found that the variables as set in the source-code > header need standard values set: > > #+NAME: classificationfm > #+BEGIN_SRC python :var prob="high" :var impact="high" > if prob == "high" and impact == "high": > return "A" > if prob == "low" and impact == "high": > return "B" > if prob == "high" and impact == "low": > return "C" > if prob == "low" and impact == "low": > return "D" > #+END_SRC > > If I don't set them I get exactly the same errors as you. Like this I > get the following: > >| prob | impact | class | >|------+--------+-------| >| high | high | A | >| low | high | B | >| high | low | C | >| low | low | D | > #+TBLFM: @2$3..@>$3='(org-sbe classificationfm (prob $$1) (impact $$2)) > > Evaluation is being asked for each line then. Thanks for the workaround to circumvent the bug. Now, it's working with my older Org as well. Is somebody fixing the bug in Org as well? (Or adding a statement to the manual?) -- get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode: > get Memacs from https://github.com/novoid/Memacs < Personal Information Management > http://Karl-Voit.at/tags/pim/ Emacs-related > http://Karl-Voit.at/tags/emacs/