You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception occurred:
File "/usr/local/lib/python3.8/dist-packages/docx/api.py", line 28, in Document
raise ValueError(tmpl % (docx, document_part.content_type))
ValueError: file 'source/internal-long-style.dotx' is not a Word file,
content type is 'application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml'
What is the correct content type? My dotx file is a direct export from MS Word. Are there any limitations to versions of MS Word? Or to cloud/desktop variants of MS Office?
Error log:
# Sphinx version: 3.5.1
# Python version: 3.8.5 (CPython)
# Docutils version: 0.15 release
# Jinja2 version: 2.11.3
# Last messages:
# reading sources... [ 66%] 01 Decision Record
# reading sources... [100%] index
#
# looking for now-outdated files...
# none found
# pickling environment...
# done
# checking consistency...
# done
# preparing documents...
# Loaded extensions:
# sphinx.ext.mathjax (3.5.1) from /usr/local/lib/python3.8/dist-packages/sphinx/ext/mathjax.py
# sphinxcontrib.applehelp (1.0.2) from /usr/local/lib/python3.8/dist-packages/sphinxcontrib/applehelp/>
# sphinxcontrib.devhelp (1.0.2) from /usr/local/lib/python3.8/dist-packages/sphinxcontrib/devhelp/__in>
# sphinxcontrib.htmlhelp (1.0.3) from /usr/local/lib/python3.8/dist-packages/sphinxcontrib/htmlhelp/__>
# sphinxcontrib.serializinghtml (1.1.4) from /usr/local/lib/python3.8/dist-packages/sphinxcontrib/seri>
# sphinxcontrib.qthelp (1.0.3) from /usr/local/lib/python3.8/dist-packages/sphinxcontrib/qthelp/__init>
# alabaster (0.7.12) from /usr/local/lib/python3.8/dist-packages/alabaster/__init__.py
# sphinx.ext.todo (3.5.1) from /usr/local/lib/python3.8/dist-packages/sphinx/ext/todo.py
# docxsphinx (unknown version) from /usr/local/lib/python3.8/dist-packages/docxsphinx/__init__.py
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/usr/local/lib/python3.8/dist-packages/sphinx/application.py", line 352, in build
self.builder.build_update()
File "/usr/local/lib/python3.8/dist-packages/sphinx/builders/__init__.py", line 293, in build_update
self.build(['__all__'], to_build)
File "/usr/local/lib/python3.8/dist-packages/sphinx/builders/__init__.py", line 360, in build
self.write(docnames, list(updated_docnames), method)
File "/usr/local/lib/python3.8/dist-packages/docxsphinx/builder.py", line 77, in write
self.prepare_writing(docnames)
File "/usr/local/lib/python3.8/dist-packages/docxsphinx/builder.py", line 62, in prepare_writing
self.writer = DocxWriter(self)
File "/usr/local/lib/python3.8/dist-packages/docxsphinx/writer.py", line 83, in __init__
dc = Document(os.path.join('source', self.template_dir))
File "/usr/local/lib/python3.8/dist-packages/docx/api.py", line 28, in Document
raise ValueError(tmpl % (docx, document_part.content_type))
ValueError: file 'source/internal-long-style.dotx' is not a Word file,
content type is 'application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml'
The text was updated successfully, but these errors were encountered:
The 'template' is actually an empty word document, a docx, so not a true template. We should document this better (see also #39 ) and perhaps indeed use a proper dotx template file.
Thanks for the info!
By the way, I can help with the docs (as a volunteer), I'll be available in June as I have too many projects on my plate right now :)
Sphinx output:
What is the correct content type? My dotx file is a direct export from MS Word. Are there any limitations to versions of MS Word? Or to cloud/desktop variants of MS Office?
Error log:
The text was updated successfully, but these errors were encountered: