From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aBroEiMu6WKHYgEAbAwnHQ (envelope-from ) for ; Tue, 02 Aug 2022 16:01:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mHACEyMu6WKvnwAA9RJhRA (envelope-from ) for ; Tue, 02 Aug 2022 16:01:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C67AE3228A for ; Tue, 2 Aug 2022 16:01:06 +0200 (CEST) Received: from localhost ([::1]:58250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsSH-0000mj-K4 for larch@yhetil.org; Tue, 02 Aug 2022 10:01:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIsQP-0008DE-UY for emacs-orgmode@gnu.org; Tue, 02 Aug 2022 09:59:09 -0400 Received: from mail-vs1-xe31.google.com ([2607:f8b0:4864:20::e31]:36597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIsQN-0000rk-T0 for emacs-orgmode@gnu.org; Tue, 02 Aug 2022 09:59:09 -0400 Received: by mail-vs1-xe31.google.com with SMTP id a63so14650384vsa.3 for ; Tue, 02 Aug 2022 06:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=XoZ2mmqPXAvFbXlqI9rrb7GeDmuBv5gYzH//tuv3nV4=; b=XeLj8hqJ/unNaM77bA+MMxGEyayJbwavYCj2bUN1WnPNVGLPBQty96JhRklYSuYbxN vdgV2J1KN0IIWM+Sqz03qhxflmO77P0fvSm7swpGP/Pg4UEsskMDdHpdXyWIGNH0eSzY 9WdYXwlMTGlRBKFmPpMaYxwc9lt48lKmjhokF+ZrcYw3RbXJSS7z1NsbjaOaDpeloLkI JdVnUFwa90vJF3n18on19RKjMzp5lVpXHDkJRREKbubYVId6OwjvLAJ5kYJUTs199i1w /z9u9RK1dk8U95fmsqAN/u8QpS3xrNvfxrBbgcTIkyiyq/ZbNqslIxeWu8/TecmuqlKR kj/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=XoZ2mmqPXAvFbXlqI9rrb7GeDmuBv5gYzH//tuv3nV4=; b=Hkz2oou904tS8R7oPq2toAYJTpCtrtvr1QoC5HGdyGiC3LbQ0JxDAhPSPsxa5AhbqQ SLY97KISUJMRQ4yRA+PEsl81PiztULKnuVbw3TucSIJH4rcn98FbSzmDxFKSZTlasR8s m+qCV4P9F9hBUqx/kSWlINfwQtyD+s9M4LmB5RaYmItgaB/qLm/FejEZDTHWKxfBbp14 qZb748VWBzA3vZcK6uQ59fZDS6jZ24mRhomjv365SrANkq6vD0A/YxvawmTqiCpHlrVb mgAUArjZRxFVhrF4SPGu3A6bbKmUxT9U4ahqJA9o2+J5sbNX4pXTzGoUnmfW8f5iqtNV bupQ== X-Gm-Message-State: AJIora80/9mkm1JUipL3adk8Af5vcTXBg7Ivva6/M9eMfjUMkJb5TyaE X6U96UPj0bCV8g86jOWM8YHksiXl98iBSfU2TrozM04vDqg= X-Google-Smtp-Source: AGRyM1tAuyceQTxxdsIVxLpmWCXF/0+o8Yhh2a3xJ/ra0Pk1WNWPYM7Aeng6oYs8nZgCRPMfKGY/sjK8d0+eGEUOCAg= X-Received: by 2002:a05:6102:3707:b0:359:4b80:a1ae with SMTP id s7-20020a056102370700b003594b80a1aemr8061707vst.16.1659448746031; Tue, 02 Aug 2022 06:59:06 -0700 (PDT) MIME-Version: 1.0 From: Darren Syzling Date: Tue, 2 Aug 2022 14:58:55 +0100 Message-ID: Subject: Exporting tables from python code block: Wrong type argument: markerp, nil To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000007bf9805e54285d1" Received-SPF: pass client-ip=2607:f8b0:4864:20::e31; envelope-from=dsyzling@gmail.com; helo=mail-vs1-xe31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659448866; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XoZ2mmqPXAvFbXlqI9rrb7GeDmuBv5gYzH//tuv3nV4=; b=X67cT2QdxR9O+50pUbpuYITmm4uaQRhfEKLt5SeGxOzFhbLos0T4PQPMdlZ7Iv81tIlgoJ XfnjrZtRvaxjy19doXo5hJgvzhN0dNYWH+loHwEOLpbFi2T0AdIOY5TjhiSHk1ouMt/ziP xq+5kbvlG2tx1eu84Oc4b15Mft2MBU8OaPKtaZBgtRk5b0MOABWcc3zDVoFLw+yF+otQWW /ZW4/hkFB0KI6eRNNoCL+kLBgpcVHjEhlBl1DiH8k9YFVri1S5yGGurRk5F3M0GrcO9zZ0 9xhhjTpdxtoQD59TDjJdJEaLNKu/PAG090N6kES5sU2mY2XS7txspyeQhZWtqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659448866; a=rsa-sha256; cv=none; b=S4Saryz5eQQkWvmYb2n1JVEfRSgedj+CPai5d1lKuvUFHArpGi2K3LMJ9ESnvDcIOCegfm 74F1KPXqihZ8FqsQ7M/PSOpJtDfIbDP8JwmDmmlSsgjF90WWBkTU07xa891tx/l8jv8WWZ 5vzUaL7l7Oy3puWy3h2tAd2aRDUb2UAyFssE3aZCJohSZ2L3msYTbVFAQQzDQUr+V2wMUq fCuaO04nbbHRTTkThb81ClQnoZEUxnov6HMkS7yJPnLHyjuf2rr7I7u3dcrRK2KVrcMntV aA6/RVY6PcC+xX8aj8hGqIjfkyck6MFJWkZXOLIhfDiJMg9CnEL39duC8gc+GA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XeLj8hqJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XeLj8hqJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C67AE3228A X-Spam-Score: -2.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9hxJSfTsvnZO --00000000000007bf9805e54285d1 Content-Type: text/plain; charset="UTF-8" I'm not sure whether this is an issue with orgmode or my recent Emacs build, I'm struggling to export orgmode tables from a python code block to html/pdf. Version info: orgmode 9.5.4 GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-07-29 Note my Emacs is a custom build with native compilation, json and GTK support - which may be an issue - i.e. taken straight from the latest code in github. My simple test case would be something like: #+begin_src python :results value raw :exports both import pandas as pd from tabulate import tabulate df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}) return tabulate(df, headers=df.columns, tablefmt='orgtbl') #+end_src If I execute the code in the editor the org-mode table appears in the results. If I export to html or pdf I get the error: org-babel-insert-result: Wrong type argument: markerp, nil. Even a simple example such as the following fails to export but will show inline. #+begin_src python :results table :exports both return [['A', 1], ['B', 2]] #+end_src Stack trace on failure is below - hence why I was concerned with the custom Emacs build: jit-lock--run-functions(248 324) jit-lock-fontify-now(248 #>) org-font-lock-ensure(248 #>) org-table-align() org-table-next-field() funcall-interactively(org-table-next-field) #(org-table-next-field nil nil) call-interactively@ido-cr+-record-current-command(# org-table-next-field nil nil) apply(call-interactively@ido-cr+-record-current-command # (org-table-next-field nil nil)) call-interactively(org-table-next-field nil nil) org-cycle() org-babel-insert-result("| | A | B |\n|----+-----+-----|\n| 0 | 1 |..." ("raw" "value" "replace") ("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:colname-names) (:rowname-names) (:result-params "raw" "value" "replace") (:result-type . value) (:results . "raw value replace") (:exports . "both") (:cache . "no") (:hlines . "no") (:noweb . "no") (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") nil "python") org-babel-execute-src-block(nil ("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:colname-names) (:rowname-names) (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:exports . "both") (:tangle . "no") (:session . "none") (:noweb . "no") (:hlines . "no") (:cache . "no")) "" nil 11 "(ref:%s)")) org-babel-exp-results(("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:cache . "no") (:colname-names) (:exports . "both") (:hlines . "no") (:noweb . "no") (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:rowname-names) (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") block nil "8ef5c3d71f4f16777939d1b561458e5435a5e4a4") org-babel-exp-do-export(("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:cache . "no") (:colname-names) (:exports . "both") (:hlines . "no") (:noweb . "no") (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:rowname-names) (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") block "8ef5c3d71f4f16777939d1b561458e5435a5e4a4") org-babel-exp-src-block() org-babel-exp-process-buffer() org-export-as(html nil nil nil (:output-file "test-case.html")) org-export-to-file(html "test-case.html" nil nil nil nil nil) org-html-export-to-html(nil nil nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) #(org-export-dispatch nil nil) call-interactively@ido-cr+-record-current-command(# org-export-dispatch nil nil) apply(call-interactively@ido-cr+-record-current-command # (org-export-dispatch nil nil)) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch) Darren --00000000000007bf9805e54285d1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm not sure whether this is an issue with orgmode or = my recent Emacs build, I'm struggling to export orgmode tables from a p= ython code block to html/pdf.

Version info:
or= gmode 9.5.4
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Versio= n 3.24.20, cairo
version 1.16.0) of 2022-07-29

= Note my Emacs is a custom build with native compilation, json and GTK suppo= rt - which may be an issue - i.e. taken straight from the latest code in gi= thub.=C2=A0

My simple test case would be something= like:

#+begin_src python :results value raw :exports b= oth
=C2=A0 import pandas as pd
=C2=A0 from tabulate import tabulate=C2=A0 df =3D pd.DataFrame({'A': [1, 2], 'B': [3, 4]})=C2=A0 return tabulate(df, headers=3Ddf.columns, tablefmt=3D'orgtbl= 9;)
#+end_src

If I execute the code in the editor= the org-mode table appears in the results. If I export to html or pdf I ge= t the error:=C2=A0org-babel-insert-result: Wrong type argument: markerp, ni= l.

Even a simple example such as the following fai= ls to export but will show inline.
#+begin_src python :results table :ex= ports both
=C2=A0 =C2=A0return [['A', 1], ['B', 2]]
#= +end_src

Stack trace on failure is below - hence why I wa= s concerned with the custom Emacs build:
=C2=A0 jit-lock--run-functions(= 248 324)
=C2=A0 jit-lock-fontify-now(248 #<marker at 324 in test-case.org<2>>)
=C2=A0 org-fon= t-lock-ensure(248 #<marker at 324 in te= st-case.org<2>>)
=C2=A0 org-table-align()
=C2=A0 org-tab= le-next-field()
=C2=A0 funcall-interactively(org-table-next-field)
= =C2=A0 #<subr call-interactively>(org-table-next-field nil nil)
= =C2=A0 call-interactively@ido-cr+-record-current-command(#<subr call-int= eractively> org-table-next-field nil nil)
=C2=A0 apply(call-interacti= vely@ido-cr+-record-current-command #<subr call-interactively> (org-t= able-next-field nil nil))
=C2=A0 call-interactively(org-table-next-field= nil nil)
=C2=A0 org-cycle()
=C2=A0 org-babel-insert-result("| = =C2=A0 =C2=A0| =C2=A0 A | =C2=A0 B |\n|----+-----+-----|\n| =C2=A00 | =C2= =A0 1 |..." ("raw" "value" "replace") (&= quot;python" "import pandas as pd\nfrom tabulate import tabulate\= n..." ((:colname-names) (:rowname-names) (:result-params "raw&quo= t; "value" "replace") (:result-type . value) (:results = . "raw value replace") (:exports . "both") (:cache . &q= uot;no") (:hlines . "no") (:noweb . "no") (:sessio= n . "none") (:tangle . "no")) "" nil 11 "= ;(ref:%s)") nil "python")
=C2=A0 org-babel-execute-src-bl= ock(nil ("python" "import pandas as pd\nfrom tabulate import= tabulate\n..." ((:colname-names) (:rowname-names) (:result-params &qu= ot;replace" "value" "raw") (:result-type . value) = (:results . "replace value raw") (:exports . "both") (:= tangle . "no") (:session . "none") (:noweb . "no&q= uot;) (:hlines . "no") (:cache . "no")) "" ni= l 11 "(ref:%s)"))
=C2=A0 org-babel-exp-results(("python&q= uot; "import pandas as pd\nfrom tabulate import tabulate\n..." ((= :cache . "no") (:colname-names) (:exports . "both") (:h= lines . "no") (:noweb . "no") (:result-params "rep= lace" "value" "raw") (:result-type . value) (:resu= lts . "replace value raw") (:rowname-names) (:session . "non= e") (:tangle . "no")) "" nil 11 "(ref:%s)&quo= t;) block nil "8ef5c3d71f4f16777939d1b561458e5435a5e4a4")
=C2= =A0 org-babel-exp-do-export(("python" "import pandas as pd\n= from tabulate import tabulate\n..." ((:cache . "no") (:colna= me-names) (:exports . "both") (:hlines . "no") (:noweb = . "no") (:result-params "replace" "value" &qu= ot;raw") (:result-type . value) (:results . "replace value raw&qu= ot;) (:rowname-names) (:session . "none") (:tangle . "no&quo= t;)) "" nil 11 "(ref:%s)") block "8ef5c3d71f4f1677= 7939d1b561458e5435a5e4a4")
=C2=A0 org-babel-exp-src-block()
=C2= =A0 org-babel-exp-process-buffer()
=C2=A0 org-export-as(html nil nil nil= (:output-file "test-case.html"))
=C2=A0 org-export-to-file(ht= ml "test-case.html" nil nil nil nil nil)
=C2=A0 org-html-expor= t-to-html(nil nil nil nil)
=C2=A0 org-export-dispatch(nil)
=C2=A0 fun= call-interactively(org-export-dispatch nil)
=C2=A0 #<subr call-intera= ctively>(org-export-dispatch nil nil)
=C2=A0 call-interactively@ido-c= r+-record-current-command(#<subr call-interactively> org-export-dispa= tch nil nil)
=C2=A0 apply(call-interactively@ido-cr+-record-current-comm= and #<subr call-interactively> (org-export-dispatch nil nil))
=C2= =A0 call-interactively(org-export-dispatch nil nil)
=C2=A0 command-execu= te(org-export-dispatch)
=C2=A0

=C2=A0Darren
=
--00000000000007bf9805e54285d1--