emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org2blog fails during upload with: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
@ 2019-12-15 14:14 Steinar Bang
  2019-12-15 17:18 ` Steinar Bang
  0 siblings, 1 reply; 2+ messages in thread
From: Steinar Bang @ 2019-12-15 14:14 UTC (permalink / raw)
  To: emacs-orgmode

Platform: Windows 10,
	  GNU Emacs 26.3 (build 1, i686-w64-mingw32) of 2019-08-29
          Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/ProgramFiles/emacs-26.3-i686/share/emacs/26.3/lisp/org/)
          Org2Blog Runtime: Org2Blog 1.1.1, MetaWeblog 1.1.1, XML-RPC 1.6.12

I've installed org2blog from melpa stable following the instructions in
 https://github.com/org2blog/org2blog#using-a-package

I've created a template article and have successfully logged in to the
blog
 https://github.com/org2blog/org2blog#make-your-first-post-in-less-5-minutes

However exporting buffer fails with the error message
 org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

I have googled the error message and found this old thread:
 https://www.mail-archive.com/emacs-orgmode@gnu.org/msg105337.html

I have manually loaded ox-org as suggested in the thread, but that
didn't make the problem go away.
 https://www.mail-archive.com/emacs-orgmode@gnu.org/msg105374.html

Does anyone know what the problem might be?

Thanks!

Stack trace from the error message:
Debugger entered--Lisp error: (error "Unknown \"nil\" back-end: Aborting export")
  signal(error ("Unknown \"nil\" back-end: Aborting export"))
  error("Unknown \"%s\" back-end: Aborting export" nil)
  org-export-barf-if-invalid-backend(nil)
  org-export-as(wp nil nil t (:section-numbers nil :with-priority nil :with-sub-superscript nil :with-toc nil :with-tags nil :with-todo-keywords nil :wp-keep-new-lines nil :wp-latex t :wp-shortcode nil :tags-as-categories nil :wp-shortcode-langs-map nil))
  org-export-to-buffer(wp "*Org WordPress Export*" nil nil nil t (:section-numbers nil :with-priority nil :with-sub-superscript nil :with-toc nil :with-tags nil :with-todo-keywords nil :wp-keep-new-lines nil :wp-latex t :wp-shortcode nil :tags-as-categories nil :wp-shortcode-langs-map nil) #f(compiled-function () #<bytecode 0x37d7eed>))
  ox-wp-export-as-wordpress(nil nil (:section-numbers nil :with-priority nil :with-sub-superscript nil :with-toc nil :with-tags nil :with-todo-keywords nil :wp-keep-new-lines nil :wp-latex t :wp-shortcode nil :tags-as-categories nil :wp-shortcode-langs-map nil))
  ox-wp-export-as-string(nil nil (:section-numbers nil :with-priority nil :with-sub-superscript nil :with-toc nil :with-tags nil :with-todo-keywords nil :wp-keep-new-lines nil :wp-latex t :wp-shortcode nil :tags-as-categories nil :wp-shortcode-langs-map nil))
  (org-no-properties (ox-wp-export-as-string nil subtree-p export-options))
  (org2blog--upload-files-replace-urls (org-no-properties (ox-wp-export-as-string nil subtree-p export-options)))
  (save-excursion (org2blog--upload-files-replace-urls (org-no-properties (ox-wp-export-as-string nil subtree-p export-options))))
  (let ((result (save-excursion (org2blog--upload-files-replace-urls (org-no-properties (ox-wp-export-as-string nil subtree-p export-options)))))) result)
  org2blog--export-as-html(nil (:section-numbers nil :with-priority nil :with-sub-superscript nil :with-toc nil :with-tags nil :with-todo-keywords nil :wp-keep-new-lines nil :wp-latex t :wp-shortcode nil :tags-as-categories nil :wp-shortcode-langs-map nil))
  (setcdr (assoc "description" post) (org2blog--export-as-html subtree-p export-options))
  (let ((post (if subtree-p (org2blog--parse-subtree-entry) (org2blog--parse-buffer-entry)))) (if tags-as-categories (progn (setcdr (assoc "categories" post) (cdr (assoc "tags" post))) (setcdr (assoc "tags" post) nil))) (setcdr (assoc "date" post) (org2blog--convert-timestamp-to-iso (org2blog--insert-current-time subtree-p (cdr (assoc "date" post))))) (setcdr (assoc "description" post) (org2blog--export-as-html subtree-p export-options)) post)
  (save-restriction (let ((post (if subtree-p (org2blog--parse-subtree-entry) (org2blog--parse-buffer-entry)))) (if tags-as-categories (progn (setcdr (assoc "categories" post) (cdr (assoc "tags" post))) (setcdr (assoc "tags" post) nil))) (setcdr (assoc "date" post) (org2blog--convert-timestamp-to-iso (org2blog--insert-current-time subtree-p (cdr (assoc "date" post))))) (setcdr (assoc "description" post) (org2blog--export-as-html subtree-p export-options)) post))
  (save-excursion (save-restriction (let ((post (if subtree-p (org2blog--parse-subtree-entry) (org2blog--parse-buffer-entry)))) (if tags-as-categories (progn (setcdr (assoc "categories" post) (cdr (assoc "tags" post))) (setcdr (assoc "tags" post) nil))) (setcdr (assoc "date" post) (org2blog--convert-timestamp-to-iso (org2blog--insert-current-time subtree-p (cdr (assoc "date" post))))) (setcdr (assoc "description" post) (org2blog--export-as-html subtree-p export-options)) post)))
  (let* ((export-options (org2blog--collect-export-options)) (tags-as-categories (plist-get export-options :tags-as-categories))) (save-excursion (save-restriction (let ((post (if subtree-p (org2blog--parse-subtree-entry) (org2blog--parse-buffer-entry)))) (if tags-as-categories (progn (setcdr (assoc "categories" post) (cdr ...)) (setcdr (assoc "tags" post) nil))) (setcdr (assoc "date" post) (org2blog--convert-timestamp-to-iso (org2blog--insert-current-time subtree-p (cdr ...)))) (setcdr (assoc "description" post) (org2blog--export-as-html subtree-p export-options)) post))))
  org2blog--export-as-post(nil)
  (let* ((from-buffer (eq source (quote buffer))) (from-subtree (eq source (quote subtree))) (to-post (eq type (quote post))) (to-page (eq type (quote page))) (thing (symbol-name type)) (made-new-entry nil) (post (org2blog--export-as-post from-subtree)) (confirm (and (org2blog--blog-property-or :confirm org2blog/wp-confirm-post) publish)) (show (or (org2blog-blog-has :show) org2blog/wp-show-post-in-browser)) post-id) (org2blog--create-categories (cdr (assoc "categories" post))) (setq post-id (cdr (assoc "post-id" post))) (if confirm (progn (if (not (y-or-n-p (concat (format "Would you like to publish your %s: “%s” (ID “%s”)" thing ... post-id) "?"))) (progn (message (concat "Canceled publishing your %s: “%s” (ID “%s”).") thing (cdr (assoc "title" post)) post-id) (throw (quote return) (list (quote failure) post-id "User canceled")))))) (condition-case err (cond ((and to-post post-id) (metaweblog-edit-post org2blog-xmlrpc org2blog-username org2blog-password post-id post publish)) ((and to-post (not post-id)) (setq post-id (metaweblog-new-post org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t)) ((and to-page post-id) (metaweblog-wp-edit-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post-id post publish)) ((and to-page (not post-id)) (setq post-id (metaweblog-wp-new-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t))) ((debug error) (org2blog--error (format (concat "I’m sorry I ran into a problem " "on %s: “%s” (ID “%s”) " "inside of ‘org2blog-entry-save’.") thing (cdr (assoc "title" post)) post-id) (format "%s" err)) (throw (quote return) (list (quote failure) post-id "RPC error")))) (if made-new-entry (progn (run-hook-with-args (quote org2blog-buffer-entry-save-hook) (org2blog--get-post-or-page post-id)) (if to-page (progn (condition-case err (setq org2blog-pages (org2blog--load-pages ...)) ((debug error) (org2blog--error ... ...))))) (if from-buffer (progn (goto-char (point-min)) (if to-post (progn (insert ...))) (insert (concat "#+POSTID: " post-id "\n")))) (if from-subtree (progn (if to-post (progn (org-entry-put ... "BLOG" org2blog-blog-key))) (org-entry-put (point) "POSTID" post-id))))) (org2blog--save-details post post-id publish from-subtree) (let* ((did (format (if publish "Published your %s: “%s”. Its ID is “%s”. " "Saved your %s as a draft: “%s”. Its ID is “%s”. ") thing (cdr (assoc "title" post)) post-id)) (showit (or (and (atom show) (symbolp show) (not (listp show)) show) (car (cdr show)))) (dont (equal showit (quote dont))) (show (equal showit (quote show))) (ask (equal showit (quote ask)))) (cond (dont (message (concat did "It looks like you decided not to automatically display " "your %s, so I won’t. If you ever want to change " "it then try customizing " "‘org2blog/wp-show-post-in-browser’.") thing)) ((not org2blog-logged-in) (message (concat did "It looks like you wanted to display your %s, but " "I couldn’t because you are not logged in to your " "blog. Please log in to your blog and try doing " "this again.") thing)) (show (message "%s" did) (cond ((and from-buffer to-post) (org2blog-buffer-post-or-page-view)) ((and from-buffer to-page) (org2blog-buffer-post-or-page-view)) ((and from-subtree to-post) (org2blog-subtree-post-or-page-view)) ((and from-subtree to-page) (org2blog-subtree-post-or-page-view)))) ((and ask (y-or-n-p (format (concat did "Would you like to display " "your %s: “%s” (ID “%s”)? ") thing (cdr ...) post-id))) (cond ((and from-buffer to-post) (org2blog-buffer-post-or-page-view)) ((and from-buffer to-page) (org2blog-buffer-post-or-page-view)) ((and from-subtree to-post) (org2blog-subtree-post-or-page-view)) ((and from-subtree to-page) (org2blog-subtree-post-or-page-view)))))) (throw (quote return) (list (quote success) post-id "It worked")))
  (catch (quote return) (widen) (let* ((from-buffer (eq source (quote buffer))) (from-subtree (eq source (quote subtree))) (to-post (eq type (quote post))) (to-page (eq type (quote page))) (thing (symbol-name type)) (made-new-entry nil) (post (org2blog--export-as-post from-subtree)) (confirm (and (org2blog--blog-property-or :confirm org2blog/wp-confirm-post) publish)) (show (or (org2blog-blog-has :show) org2blog/wp-show-post-in-browser)) post-id) (org2blog--create-categories (cdr (assoc "categories" post))) (setq post-id (cdr (assoc "post-id" post))) (if confirm (progn (if (not (y-or-n-p (concat ... "?"))) (progn (message (concat "Canceled publishing your %s: “%s” (ID “%s”).") thing (cdr ...) post-id) (throw (quote return) (list ... post-id "User canceled")))))) (condition-case err (cond ((and to-post post-id) (metaweblog-edit-post org2blog-xmlrpc org2blog-username org2blog-password post-id post publish)) ((and to-post (not post-id)) (setq post-id (metaweblog-new-post org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t)) ((and to-page post-id) (metaweblog-wp-edit-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post-id post publish)) ((and to-page (not post-id)) (setq post-id (metaweblog-wp-new-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t))) ((debug error) (org2blog--error (format (concat "I’m sorry I ran into a problem " "on %s: “%s” (ID “%s”) " "inside of ‘org2blog-entry-save’.") thing (cdr (assoc "title" post)) post-id) (format "%s" err)) (throw (quote return) (list (quote failure) post-id "RPC error")))) (if made-new-entry (progn (run-hook-with-args (quote org2blog-buffer-entry-save-hook) (org2blog--get-post-or-page post-id)) (if to-page (progn (condition-case err (setq org2blog-pages ...) (... ...)))) (if from-buffer (progn (goto-char (point-min)) (if to-post (progn ...)) (insert (concat "#+POSTID: " post-id "\n")))) (if from-subtree (progn (if to-post (progn ...)) (org-entry-put (point) "POSTID" post-id))))) (org2blog--save-details post post-id publish from-subtree) (let* ((did (format (if publish "Published your %s: “%s”. Its ID is “%s”. " "Saved your %s as a draft: “%s”. Its ID is “%s”. ") thing (cdr (assoc "title" post)) post-id)) (showit (or (and (atom show) (symbolp show) (not ...) show) (car (cdr show)))) (dont (equal showit (quote dont))) (show (equal showit (quote show))) (ask (equal showit (quote ask)))) (cond (dont (message (concat did "It looks like you decided not to automatically display " "your %s, so I won’t. If you ever want to change " "it then try customizing " "‘org2blog/wp-show-post-in-browser’.") thing)) ((not org2blog-logged-in) (message (concat did "It looks like you wanted to display your %s, but " "I couldn’t because you are not logged in to your " "blog. Please log in to your blog and try doing " "this again.") thing)) (show (message "%s" did) (cond ((and from-buffer to-post) (org2blog-buffer-post-or-page-view)) ((and from-buffer to-page) (org2blog-buffer-post-or-page-view)) ((and from-subtree to-post) (org2blog-subtree-post-or-page-view)) ((and from-subtree to-page) (org2blog-subtree-post-or-page-view)))) ((and ask (y-or-n-p (format ... thing ... post-id))) (cond ((and from-buffer to-post) (org2blog-buffer-post-or-page-view)) ((and from-buffer to-page) (org2blog-buffer-post-or-page-view)) ((and from-subtree to-post) (org2blog-subtree-post-or-page-view)) ((and from-subtree to-page) (org2blog-subtree-post-or-page-view)))))) (throw (quote return) (list (quote success) post-id "It worked"))))
  (save-restriction (catch (quote return) (widen) (let* ((from-buffer (eq source (quote buffer))) (from-subtree (eq source (quote subtree))) (to-post (eq type (quote post))) (to-page (eq type (quote page))) (thing (symbol-name type)) (made-new-entry nil) (post (org2blog--export-as-post from-subtree)) (confirm (and (org2blog--blog-property-or :confirm org2blog/wp-confirm-post) publish)) (show (or (org2blog-blog-has :show) org2blog/wp-show-post-in-browser)) post-id) (org2blog--create-categories (cdr (assoc "categories" post))) (setq post-id (cdr (assoc "post-id" post))) (if confirm (progn (if (not (y-or-n-p ...)) (progn (message ... thing ... post-id) (throw ... ...))))) (condition-case err (cond ((and to-post post-id) (metaweblog-edit-post org2blog-xmlrpc org2blog-username org2blog-password post-id post publish)) ((and to-post (not post-id)) (setq post-id (metaweblog-new-post org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t)) ((and to-page post-id) (metaweblog-wp-edit-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post-id post publish)) ((and to-page (not post-id)) (setq post-id (metaweblog-wp-new-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post publish)) (setq made-new-entry t))) ((debug error) (org2blog--error (format (concat "I’m sorry I ran into a problem " "on %s: “%s” (ID “%s”) " "inside of ‘org2blog-entry-save’.") thing (cdr ...) post-id) (format "%s" err)) (throw (quote return) (list (quote failure) post-id "RPC error")))) (if made-new-entry (progn (run-hook-with-args (quote org2blog-buffer-entry-save-hook) (org2blog--get-post-or-page post-id)) (if to-page (progn (condition-case err ... ...))) (if from-buffer (progn (goto-char ...) (if to-post ...) (insert ...))) (if from-subtree (progn (if to-post ...) (org-entry-put ... "POSTID" post-id))))) (org2blog--save-details post post-id publish from-subtree) (let* ((did (format (if publish "Published your %s: “%s”. Its ID is “%s”. " "Saved your %s as a draft: “%s”. Its ID is “%s”. ") thing (cdr ...) post-id)) (showit (or (and ... ... ... show) (car ...))) (dont (equal showit (quote dont))) (show (equal showit (quote show))) (ask (equal showit (quote ask)))) (cond (dont (message (concat did "It looks like you decided not to automatically display " "your %s, so I won’t. If you ever want to change " "it then try customizing " "‘org2blog/wp-show-post-in-browser’.") thing)) ((not org2blog-logged-in) (message (concat did "It looks like you wanted to display your %s, but " "I couldn’t because you are not logged in to your " "blog. Please log in to your blog and try doing " "this again.") thing)) (show (message "%s" did) (cond (... ...) (... ...) (... ...) (... ...))) ((and ask (y-or-n-p ...)) (cond (... ...) (... ...) (... ...) (... ...))))) (throw (quote return) (list (quote success) post-id "It worked")))))
  (save-excursion (save-restriction (catch (quote return) (widen) (let* ((from-buffer (eq source (quote buffer))) (from-subtree (eq source (quote subtree))) (to-post (eq type (quote post))) (to-page (eq type (quote page))) (thing (symbol-name type)) (made-new-entry nil) (post (org2blog--export-as-post from-subtree)) (confirm (and (org2blog--blog-property-or :confirm org2blog/wp-confirm-post) publish)) (show (or (org2blog-blog-has :show) org2blog/wp-show-post-in-browser)) post-id) (org2blog--create-categories (cdr (assoc "categories" post))) (setq post-id (cdr (assoc "post-id" post))) (if confirm (progn (if (not ...) (progn ... ...)))) (condition-case err (cond ((and to-post post-id) (metaweblog-edit-post org2blog-xmlrpc org2blog-username org2blog-password post-id post publish)) ((and to-post ...) (setq post-id ...) (setq made-new-entry t)) ((and to-page post-id) (metaweblog-wp-edit-page org2blog-xmlrpc org2blog-username org2blog-password org2blog-blogid post-id post publish)) ((and to-page ...) (setq post-id ...) (setq made-new-entry t))) ((debug error) (org2blog--error (format ... thing ... post-id) (format "%s" err)) (throw (quote return) (list ... post-id "RPC error")))) (if made-new-entry (progn (run-hook-with-args (quote org2blog-buffer-entry-save-hook) (org2blog--get-post-or-page post-id)) (if to-page (progn ...)) (if from-buffer (progn ... ... ...)) (if from-subtree (progn ... ...)))) (org2blog--save-details post post-id publish from-subtree) (let* ((did (format ... thing ... post-id)) (showit (or ... ...)) (dont (equal showit ...)) (show (equal showit ...)) (ask (equal showit ...))) (cond (dont (message ... thing)) ((not org2blog-logged-in) (message ... thing)) (show (message "%s" did) (cond ... ... ... ...)) ((and ask ...) (cond ... ... ... ...)))) (throw (quote return) (list (quote success) post-id "It worked"))))))
  org2blog-entry-save(buffer post nil)
  org2blog-buffer-post-save(nil)
  funcall-interactively(org2blog-buffer-post-save nil)
  call-interactively(org2blog-buffer-post-save)
  hydra--call-interactively-remap-maybe(org2blog-buffer-post-save)
  (progn (setq this-command (quote org2blog-buffer-post-save)) (hydra--call-interactively-remap-maybe (function org2blog-buffer-post-save)))
  org2blog--hydra-main/org2blog-buffer-post-save-and-exit()
  funcall-interactively(org2blog--hydra-main/org2blog-buffer-post-save-and-exit)
  call-interactively(org2blog--hydra-main/org2blog-buffer-post-save-and-exit nil nil)
  command-execute(org2blog--hydra-main/org2blog-buffer-post-save-and-exit)

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

* Re: org2blog fails during upload with: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
  2019-12-15 14:14 org2blog fails during upload with: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export Steinar Bang
@ 2019-12-15 17:18 ` Steinar Bang
  0 siblings, 0 replies; 2+ messages in thread
From: Steinar Bang @ 2019-12-15 17:18 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> Steinar Bang <sb@dod.no>:

> Platform: Windows 10,
> 	  GNU Emacs 26.3 (build 1, i686-w64-mingw32) of 2019-08-29
>           Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/ProgramFiles/emacs-26.3-i686/share/emacs/26.3/lisp/org/)
>           Org2Blog Runtime: Org2Blog 1.1.1, MetaWeblog 1.1.1, XML-RPC 1.6.12

> I've installed org2blog from melpa stable following the instructions in
>  https://github.com/org2blog/org2blog#using-a-package

> I've created a template article and have successfully logged in to the
> blog
>  https://github.com/org2blog/org2blog#make-your-first-post-in-less-5-minutes

> However exporting buffer fails with the error message
>  org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

> I have googled the error message and found this old thread:
>  https://www.mail-archive.com/emacs-orgmode@gnu.org/msg105337.html

> I have manually loaded ox-org as suggested in the thread, but that
> didn't make the problem go away.
>  https://www.mail-archive.com/emacs-orgmode@gnu.org/msg105374.html

I read the source code and manually loaded ox-wp:
 M-x load-library ox-wp RET

And then "Save post draft" saved the article.

Now I have to figure out why installing the package from melpa statble
wasn't enough. 

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

end of thread, other threads:[~2019-12-15 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-15 14:14 org2blog fails during upload with: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export Steinar Bang
2019-12-15 17:18 ` Steinar Bang

Code repositories for project(s) associated with this public 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).