Skip to content

Instantly share code, notes, and snippets.

@shirou
Created January 26, 2018 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirou/252693be49ad642ef65a1f8371c186b6 to your computer and use it in GitHub Desktop.
Save shirou/252693be49ad642ef65a1f8371c186b6 to your computer and use it in GitHub Desktop.
sphinx 1.7.0b1 error

json

json is a most imporant keyword to reproduce.

{
  "key": "hoge"
}
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Alpaca Forecast Platform documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 14 15:58:11 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'hoge'
copyright = '2017, hoge'
author = 'hoge'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1'
# The full version, including alpha/beta/rc tags.
release = '1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
]
}
source_parsers = {'.md': CommonMarkParser}
def setup(app):
app.add_config_value('recommonmark_config', {
'auto_toc_tree_section': 'Contents',
}, True)
app.add_transform(AutoStructify)
# Sphinx version: 1.7.0b1
# Python version: 3.6.3 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# building [mo]: targets for 0 po files that are out of date
#
# building [html]: targets for 2 source files that are out of date
#
# updating environment:
#
# 2 added, 0 changed, 0 removed
#
# reading sources... [ 50%] a
#
# Loaded extensions:
# alabaster (0.7.10) from /home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/alabaster/__init__.py
# sphinx.ext.autodoc (1.7.0b1) from /home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/ext/autodoc/__init__.py
# sphinx.ext.todo (1.7.0b1) from /home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/ext/todo.py
# sphinx.ext.mathjax (1.7.0b1) from /home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/ext/mathjax.py
# sphinx.ext.viewcode (1.7.0b1) from /home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/ext/viewcode.py
Traceback (most recent call last):
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/cmdline.py", line 287, in main
app.build(args.force_all, filenames)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/application.py", line 331, in build
self.builder.build_update()
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 330, in build_update
'out of date' % len(to_build))
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 343, in build
updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 568, in update
self._read_serial(docnames, self.app)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 587, in _read_serial
self.read_doc(docname, app)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 662, in read_doc
doctree = read_doc(self.app, self, self.doc2path(docname))
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/io.py", line 294, in read_doc
pub.publish()
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/docutils/core.py", line 218, in publish
self.apply_transforms()
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/docutils/core.py", line 199, in apply_transforms
self.document.transformer.apply_transforms()
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/sphinx/transforms/__init__.py", line 95, in apply_transforms
Transformer.apply_transforms(self)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
transform.apply(**kwargs)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/transform.py", line 325, in apply
self.traverse(self.document)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/transform.py", line 297, in traverse
self.traverse(child)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/transform.py", line 287, in traverse
newnode = self.find_replace(c)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/transform.py", line 269, in find_replace
newnode = self.auto_code_block(node)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/transform.py", line 228, in auto_code_block
self.current_level)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/recommonmark/states.py", line 50, in reset
self.memo.inliner.init_customizations(document.settings)
File "/home/shirou/Works/VEnvs/sphinx/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 605, in init_customizations
if settings.pep_references:
AttributeError: 'Values' object has no attribute 'pep_references'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment