Please ignore the noise. I had added the odt template to the file to be exported; it included the following line:

#+ODT_STYLES_FILE:

Which I guess overrode my setting for odt_styles_dir.

solved.


On Mon, Jan 2, 2017 at 8:59 PM, Matt Price <moptop99@gmail.com> wrote:
I tried and then reverted a very simple change ot ox-odt.el -- I wanted to export a unicode symbol instead of [ ] for an empty checkbox. 

After this, odt export fails mysteriously with the following:

------------
Wrote /tmp/odt-3348W1J/meta.xml
Using vacuous schema
OpenDocument export failed: Cannot revert nonexistent file /tmp/odt-3348W1J/styles.xml
Result: "OpenDocument export failed: Cannot revert nonexistent file /tmp/odt-3348W1J/styles.xml"
------------

I tried instrumenting org-odt-export-to-odt but was not able to narrow the error down further than:

(org-odt--export-wrap
       outfile
       (let* ((org-odt-embedded-images-count 0)
          (org-odt-embedded-formulas-count 0)
          (org-odt-automatic-styles nil)
          (org-odt-object-counters nil)
          ;; Let `htmlfontify' know that we are interested in collecting
          ;; styles.
          (hfy-user-sheet-assoc nil))
     ;; Initialize content.xml and kick-off the export process.
     (let ((output (org-export-as 'odt subtreep visible-only nil ext-plist))
           (out-buf (progn
              (require 'nxml-mode)
              (let ((nxml-auto-insert-xml-declaration-flag nil))
                (find-file-noselect
                 (concat org-odt-zip-dir "content.xml") t)))))
       (with-current-buffer out-buf (erase-buffer) (insert output)))))


i don't seem to be able to instrument the org-odt--export-wrap macro, but maybe the error report comes from this section around line 4067:

(error
    ;; Cleanup work directory and work files.
    (funcall --cleanup-xml-buffers)
    (message "OpenDocument export failed: %s"
         (error-message-string err)

This is with a pretty recent git master w/ a few changes applied only to ox-html.el. 

~git diff master~

shows no changes to ox-odt.el, but I restarted emacs and restarted my laptop just in case -- the problem still persists. 

Thanks!

Matt