emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT
@ 2020-04-05  3:25 Perl Ancar
  2020-04-05  5:16 ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Perl Ancar @ 2020-04-05  3:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Dear all,

I tried exporting a document with table that has caption to ODT and it
failed with this error message:

    OpenDocument export failed: Wrong number of arguments: nil, 0

Sample document:

    #+CAPTION: some caption
    | row1 |

Export is successful when caption is removed. Export is successful for
image captions. Export to HTML or Markdown is successful. Org-mode version
8.2.10, Emacs 25.2.2 on LinuxMint 19.

Any pointer?

[-- Attachment #2: Type: text/html, Size: 655 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT
  2020-04-05  3:25 "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT Perl Ancar
@ 2020-04-05  5:16 ` Kyle Meyer
  2020-04-05 10:05   ` Perl Ancar
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2020-04-05  5:16 UTC (permalink / raw)
  To: Perl Ancar; +Cc: emacs-orgmode

Perl Ancar <perlancar@gmail.com> writes:

> I tried exporting a document with table that has caption to ODT and it
> failed with this error message:
>
>     OpenDocument export failed: Wrong number of arguments: nil, 0
>
> Sample document:
>
>     #+CAPTION: some caption
>     | row1 |

Trying with the latest release of Org (9.3.6), I exported this without
hitting the above error, so upgrading will likely resolve the issue for
you.

> Any pointer?

If upgrading doesn't work for you (or you'd just like to investigate),
doing "M-x toggle-debug-on-error" and getting a backtrace could be a
good place to start.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT
  2020-04-05  5:16 ` Kyle Meyer
@ 2020-04-05 10:05   ` Perl Ancar
  2020-04-05 17:03     ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Perl Ancar @ 2020-04-05 10:05 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

On Sun, Apr 5, 2020 at 12:16 PM Kyle Meyer <kyle@kyleam.com> wrote:

> Perl Ancar <perlancar@gmail.com> writes:
>
> > I tried exporting a document with table that has caption to ODT and it
> > failed with this error message:
> >
> >     OpenDocument export failed: Wrong number of arguments: nil, 0
> >
> > Sample document:
> >
> >     #+CAPTION: some caption
> >     | row1 |
>
> Trying with the latest release of Org (9.3.6), I exported this without
> hitting the above error, so upgrading will likely resolve the issue for
> you.
>
> > Any pointer?
>
> If upgrading doesn't work for you (or you'd just like to investigate),
> doing "M-x toggle-debug-on-error" and getting a backtrace could be a
> good place to start.
>

Unfortunately after M-x toggle-debug-on-error I'm not getting relevant
additional messages in the *Messages* buffer (I read that messages will
appear in the *Warnings* buffer, but I see that there is no *Warnings*
buffer created):

    Debug on Error enabled globally
    Debug (ox-odt): Searching for OpenDocument styles files...
    Debug (ox-odt): Trying /usr/share/emacs/25.2/etc/styles/... [2 times]
    Debug (ox-odt): Trying /usr/share/emacs/25.2/lisp/org/etc/styles/...
    Debug (ox-odt): Trying /usr/share/emacs/25.2/etc/org/...
    Debug (ox-odt): Using styles under /usr/share/emacs/25.2/etc/org/
    Debug (ox-odt): Searching for OpenDocument schema files...
    Debug (ox-odt): Trying /usr/share/emacs/25.2/etc/schema/...
    Debug (ox-odt): No OpenDocument schema files installed
    LaTeX to MathML converter not available.
    Formatting LaTeX using verbatim
    OpenDocument export failed: Wrong number of arguments: nil, 0
    You can run the command ‘org-odt-export-to-odt’ with M-x -od-t RET

However, when trying to upgrade org, I try exporting under "emacs -q" and
this error does not happen. So I'll need to comb through my years-old
~/.emacs to try to figure out what causes this error.

[-- Attachment #2: Type: text/html, Size: 2580 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT
  2020-04-05 10:05   ` Perl Ancar
@ 2020-04-05 17:03     ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2020-04-05 17:03 UTC (permalink / raw)
  To: Perl Ancar; +Cc: emacs-orgmode

Perl Ancar <perlancar@gmail.com> writes:

> On Sun, Apr 5, 2020 at 12:16 PM Kyle Meyer <kyle@kyleam.com> wrote:
>
>> > Any pointer?
>>
>> If upgrading doesn't work for you (or you'd just like to investigate),
>> doing "M-x toggle-debug-on-error" and getting a backtrace could be a
>> good place to start.
>>
>
> Unfortunately after M-x toggle-debug-on-error I'm not getting relevant
> additional messages in the *Messages* buffer (I read that messages will
> appear in the *Warnings* buffer, but I see that there is no *Warnings*
> buffer created):

Ah, sorry for the unhelpful suggestion.  It looks like that error is
being caught (which I should have guessed from the "OpenDocument ..."
prefix):


  (defmacro org-odt--export-wrap (out-file &rest body)
    [...]
       (condition-case err
           [...]
         (error
          ;; Cleanup work directory and work files.
          (funcall --cleanup-xml-buffers)
          (message "OpenDocument export failed: %s"
                   (error-message-string err)))))

So to see the error, you could either remove that error handling or
tweak it to re-throw it:

    (signal (car err) (cdr err))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-05 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05  3:25 "Wrong number of arguments: nil, 0" error when exporting a table with caption to ODT Perl Ancar
2020-04-05  5:16 ` Kyle Meyer
2020-04-05 10:05   ` Perl Ancar
2020-04-05 17:03     ` Kyle Meyer

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).