jkitchin / ox-ipynb

org-mode exporter to Jupyter notebooks
170 stars 39 forks source link

export of example code fails with wrong number of arguments #18

Closed uliw closed 5 years ago

uliw commented 5 years ago

Hi there,

I am trying to set up ox-ipynb on my computer. However, whenever I run the export of the example document, I get an error (see below). Note, I did add ob-ipython, but I did not install a local juypter server. I assume that this errors is caused by a botched emacs installation and would be grateful for some pointers on how debug this (I am no lisp programmer though)

Thank you so much

Uli

Debugger entered--Lisp error: (wrong-number-of-arguments (0 . 0) 1) org-get-tags(98) (-intersection (org-get-tags (org-element-property :begin hl)) exclude-tags) (if (-intersection (org-get-tags (org-element-property :begin hl)) exclude-tags) (progn hl)) (closure ((exclude-tags "noexport") (--buf-copy . #<buffer example.org<2>>) t) (hl) (if (-intersection (org-get-tags (org-element-property :begin hl)) exclude-tags) (progn hl)))((headline (:raw-value "Introduction" :begin 98 :end 3402 :pre-blank 1 :contents-begin 114 :contents-end 3401 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 98 :title (#("Introduction" 0 12 (:parent (headline (:raw-value "Introduction" :begin 98 :end 3402 :pre-blank 1 :contents-begin 114 :contents-end 3401 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 98 :title (#0) :parent (org-data nil (section (:begin 1 :end 98 :contents-begin 1 :contents-end 97 :post-blank 1 :post-affiliated 1 :parent #4) (keyword (:key "TITLE" :value "Example of org to ipynb" :begin 1 :end 34 :post-blank 0 :post-affiliated 1 :parent #5)) (keyword (:key "AUTHOR" :value "John Kitchin" :begin 34 :end 58 :post-blank 1 :post-affiliated 34 :parent #5)) (keyword (:key "OX-IPYNB-KEYWORD-METADATA" :value "key1 key2" :begin 58 :end 97 :post-blank 0 :post-affiliated 58 :parent #5))) #2)) (section (:begin 114 :end 585 :contents-begin 114 :contents-end 584 :post-blank 1 :post-affiliated 114 :parent #2) (paragraph (:begin 114 :end 368 :contents-begin 114 :contents-end 367 :post-blank 1 :post-affiliated 114 :parent #3) #("I wrote this module to allow me to write lecture notes in org-mode, but export them to ipython notebooks for my students. It also makes it easier to share my w

jkitchin commented 5 years ago

this looks like an org-mode version error. What version of org are you using. If you can, try updating to org 9.2.

AoifeHughes commented 5 years ago

I'm on org 9.2 and still getting this issue

AoifeHughes commented 5 years ago

Checked further, I don't think it's to do with org-version. I've got your scimax and my config side by side and same org-version with no luck, though same error.

jkitchin commented 5 years ago

What do you see with C-h f org-get-tags? What I see is a signature like (org-get-tags &optional POS LOCAL) which is how it is called in ox-ipynb. If you click on the org.el link in the help window, does it go to the right file, i.e. not somehow to an older version of org?

I have Org mode version 9.2.3 (9.2.3-23-g967801-elpaplus @ /Users/jkitchin/.emacs.d/elpa/org-plus-contrib-20190603/) from M-x org-version.

uliw commented 5 years ago

My version shows 9.1.9, and if I do C-h f org-get-tags

org-get-tags is a compiled Lisp function.

(org-get-tags)

Get the list of tags specified in the current headline.

Uli

On Wed, Jun 19, 2019 at 10:48 AM John Kitchin notifications@github.com wrote:

What do you see with C-h f org-get-tags? What I see is a signature like (org-get-tags &optional POS LOCAL) which is how it is called in ox-ipynb. If you click on the org.el link in the help window, does it go to the right file, i.e. not somehow to an older version of org?

I have Org mode version 9.2.3 (9.2.3-23-g967801-elpaplus @ /Users/jkitchin/.emacs.d/elpa/org-plus-contrib-20190603/) from M-x org-version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkitchin/ox-ipynb/issues/18?email_source=notifications&email_token=ABWSVAV2BZ4ZJ42KEYABQ6DP3JBLFA5CNFSM4HZDQXTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCDTWQ#issuecomment-503593434, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWSVAQTXUFHJUPVAIMJ57TP3JBLFANCNFSM4HZDQXTA .

-- Ulrich G. Wortmann http://www.es.utoronto.ca/people/faculty/wortmann-ulrich/ http://webcan.es.utoronto.ca/people/faculty/wortmann-ulrich/ Dept. of Earth Sciences Fax : 416 978 3938 University of Toronto Phone: 416 978 7084 22 Russell Street, Toronto, ON, Canada M5S 3B1

jkitchin commented 5 years ago

maybe the problem is org 9.1 vs 9.2 then. your signature for org-get-tags looks like it should take no args, but in ox-ipynb it is called with arguments, and that is why you get that error. The way it is called is compatible with 9.2.3, but not 9.1.9 I guess. Can you update to 9.2+

uliw commented 5 years ago

ok, that did the trick. It works out of the box with org 9.2.4

Thanks John!

Uli

On Wed, Jun 19, 2019 at 1:26 PM John Kitchin notifications@github.com wrote:

maybe the problem is org 9.1 vs 9.2 then. your signature for org-get-tags looks like it should take no args, but in ox-ipynb it is called with arguments, and that is why you get that error. The way it is called is compatible with 9.2.3, but not 9.1.9 I guess. Can you update to 9.2+

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkitchin/ox-ipynb/issues/18?email_source=notifications&email_token=ABWSVASV5FKJRXI4WQDUQFLP3JT5VA5CNFSM4HZDQXTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCSSDI#issuecomment-503654669, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWSVARI27T4TDQGJAYAGYDP3JT5VANCNFSM4HZDQXTA .

-- Ulrich G. Wortmann http://www.es.utoronto.ca/people/faculty/wortmann-ulrich/ http://webcan.es.utoronto.ca/people/faculty/wortmann-ulrich/ Dept. of Earth Sciences Fax : 416 978 3938 University of Toronto Phone: 416 978 7084 22 Russell Street, Toronto, ON, Canada M5S 3B1

jkitchin commented 5 years ago

👍