I have this weird error I don't understand :
#+begin_src plantuml :file img/example-uml.png
@startuml
class Example {
- value : Integer
- other : Double
+ up()
+ down()
}
@enduml
#+end_src
This fails with a wrong type argument : char-or-string-p, nil
. It seems to be a problem with the :file
header arg as using other nonsensical values such as :file 1
outputs wrong type argument stringp, 1
. And :file "example.png"
outputs wrong type argument : char-or-string-p, nil
as well. If I remove it, the block complains it has to have a :file
argument.
This is the relevant defun in ob-plantuml
. But it never uses char-or-string-p
to validate the arguments. So maybe it's something with the org block ?
I'll add that I have org-plantuml-jar-path
set properly and that the creation of the image does work in plantuml-mode
, which is all the more frustrating.
I use emacs 27.1 and org-mode version 9.3.
Can someone help me ?
Thanks
Edit : added the backtrace
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
org-babel-execute:plantuml("@startuml\nclass Example {\n- value : Integer\n- othe..." ((:colname-names) (:rowname-names) (:result-params "replace" "file") (:result-type . value) (:results . "replace file") (:exports . "results") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:file . "img/example-uml.png")))
org-babel-execute-src-block(nil ("plantuml" "@startuml\nclass Example {\n- value : Integer\n- othe..." ((:colname-names) (:rowname-names) (:result-params "file" "replace") (:result-type . value) (:results . "file replace") (:exports . "results") (:file . "img/example-uml.png") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 4196 "(ref:%s)"))
org-ctrl-c-ctrl-c(nil)
funcall-interactively(org-ctrl-c-ctrl-c nil)
call-interactively(org-ctrl-c-ctrl-c nil nil)
command-execute(org-ctrl-c-ctrl-c)
M-x toggle-debug-on-error
, repeat the evaluation of the block and post the backtrace that you get. That wil pinpoint the problem much better.:file example.png
, everythng works.