Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html_last_updated_fmt in conf.py causes build failure #48

Open
pgray-argo opened this issue Oct 31, 2017 · 1 comment
Open

html_last_updated_fmt in conf.py causes build failure #48

pgray-argo opened this issue Oct 31, 2017 · 1 comment

Comments

@pgray-argo
Copy link

When using sphinx-versioning with html_last_updated_fmt = '' in my conf.py file, the following crash occurs. It appears that sphinx-versioning is attempting to call the format_date function with an extra argument. This could be related to #39.

# Sphinx version: 1.6.5
# Python version: 3.6.3 (CPython)
# Docutils version: 0.14 
# Jinja2 version: 2.9.6
# Last messages:
#   checking consistency...
#   
#   done
#   
#   preparing documents...
#   
#   done
#   
#   writing output... [ 20%] index
#   
# Loaded extensions:
#   alabaster (0.7.10) from /usr/local/lib/python3.6/site-packages/alabaster/__init__.py
#   sphinx.ext.todo (1.6.5) from /usr/local/lib/python3.6/site-packages/sphinx/ext/todo.py
#   sphinx.ext.githubpages (1.6.5) from /usr/local/lib/python3.6/site-packages/sphinx/ext/githubpages.py
#   sphinxcontrib.versioning.sphinx_ (2.2.1) from /usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sphinxcontrib/versioning/sphinx_.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sphinx/cmdline.py", line 306, in main
    app.build(opts.force_all, filenames)
  File "/usr/local/lib/python3.6/site-packages/sphinx/application.py", line 339, in build
    self.builder.build_update()
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 331, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 397, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 434, in write
    self._write_serial(sorted(docnames))
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 443, in _write_serial
    self.write_doc(docname, doctree)
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/html.py", line 561, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "/usr/local/lib/python3.6/site-packages/sphinx/builders/html.py", line 949, in handle_page
    templatename, ctx, event_arg)
  File "/usr/local/lib/python3.6/site-packages/sphinx/application.py", line 493, in emit_firstresult
    return self.events.emit_firstresult(event, self, *args)
  File "/usr/local/lib/python3.6/site-packages/sphinx/events.py", line 84, in emit_firstresult
    for result in self.emit(name, *args):
  File "/usr/local/lib/python3.6/site-packages/sphinx/events.py", line 79, in emit
    results.append(callback(*args))
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sphinxcontrib/versioning/sphinx_.py", line 134, in html_page_context
    context['last_updated'] = format_date(lufmt, mtime, language=app.config.language, warn=app.warn)
TypeError: format_date() got an unexpected keyword argument 'warn'
@paddy-hack
Copy link

This is a very different issue (but probably introduced by the same Sphinx version 😉). There's a fix for this in #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants