Giter Club home page Giter Club logo

fulltoc's People

Contributors

dhellmann avatar electrofelix avatar eli-collins avatar jszakmeister avatar phaustin avatar ryanpetrello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fulltoc's Issues

pip install: metadata-generation-failed

Thanks for providing fulltoc!

Travis-CI cannot install fulltoc for my workflow for some days now. Unfortunately, I cannot reproduce the problem on my computer (Windows, Python 3.9), so it is hard to fix this. Any advice?

Python 3.7.1
$ pip --version
pip 22.0.4 from /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/pip (python 3.7)
install.1
2.12s$ pip install --upgrade pip virtualenv
5.46s$ pip install -r requirements.txt
Requirement already satisfied: attrs in /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (21.4.0)
Collecting black
  Downloading black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB)
Collecting bokeh
  Downloading bokeh-2.4.2-py3-none-any.whl (18.5 MB)
Collecting build
  Downloading build-0.7.0-py3-none-any.whl (16 kB)
Collecting click
  Downloading click-8.1.1-py3-none-any.whl (96 kB)
Collecting coverage
  Downloading coverage-6.3.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207 kB)
Collecting Cython
  Downloading Cython-0.29.28-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting docutils
  Downloading docutils-0.18.1-py2.py3-none-any.whl (570 kB)
Collecting lastversion
  Downloading lastversion-2.2.2-py3-none-any.whl (55 kB)
Collecting matplotlib
  Downloading matplotlib-3.5.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.2 MB)
Collecting netcdf4
  Downloading netCDF4-1.5.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)
Collecting networkx
  Downloading networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting nox
  Downloading nox-2022.1.7-py3-none-any.whl (51 kB)
Requirement already satisfied: numpy in /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages (from -r requirements.txt (line 14)) (1.16.4)
Requirement already satisfied: packaging in /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages (from -r requirements.txt (line 15)) (19.0)
Collecting pandas
  Downloading pandas-1.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB)
Collecting plotly
  Downloading plotly-5.6.0-py2.py3-none-any.whl (27.7 MB)
Collecting pynsist
  Downloading pynsist-2.8-py3-none-any.whl (2.8 MB)
Requirement already satisfied: setuptools in /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages (from -r requirements.txt (line 19)) (60.10.0)
Collecting typing_extensions
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting scipy
  Downloading scipy-1.7.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (38.1 MB)
Collecting sphinx
  Downloading Sphinx-4.5.0-py3-none-any.whl (3.1 MB)
Collecting sphinxcontrib-bibtex
  Downloading sphinxcontrib_bibtex-2.4.1-py3-none-any.whl (38 kB)
Collecting sphinxcontrib-fulltoc
  Downloading sphinxcontrib-fulltoc-1.2.0.tar.gz (13 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 14, in <module>
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
          from setuptools.dist import Distribution
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
          from ._importlib import metadata
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/setuptools/_importlib.py", line 28, in <module>
          disable_importlib_metadata_finder(metadata)
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/setuptools/_importlib.py", line 12, in disable_importlib_metadata_finder
          import importlib_metadata
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 471, in <module>
          __version__ = version(__name__)
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 438, in version
          return distribution(package).version
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 411, in distribution
          return Distribution.from_name(package)
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 179, in from_name
          dists = resolver(name)
        File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 886, in find_distributions
          found = self._search_paths(context.name, context.path)
      AttributeError: 'str' object has no attribute 'name'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
The command "pip install -r requirements.txt" failed and exited with 1 during .

Deprecation warnings

I'm in the process of packaging this for Arch Linux, there's quite a few deprecation warnings displayed when building this using either legacy setup.py or the build module (PEP-517 compatible).

/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
  warnings.warn(
[pbr] Generating ChangeLog
/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
  warnings.warn(
running install
[pbr] Writing ChangeLog
[pbr] Generating ChangeLog
[pbr] ChangeLog complete (0.0s)
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.0s)
running build

For some reason, some warnings are displayed twice.

  • The dash-separated ones are easily fixable:
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,11 +1,11 @@
 [metadata]
 name = sphinxcontrib-fulltoc
 summary = Include a full table of contents in your Sphinx HTML sidebar
-description-file =
+description_file =
     README.rst
 author = Doug Hellmann
-author-email = [email protected]
-home-page = http://sphinxcontrib-fulltoc.readthedocs.org
+author_email = [email protected]
+home_page = https://sphinxcontrib-fulltoc.readthedocs.org
 classifier =
     Development Status :: 4 - Beta
     Environment :: Console
  • The python setup.py build/install one is trivial (we are migrating away from using setup.py because it is legacy).

  • The easy_install one seems to be linked to the usage of the pbr module. I suggest that moving away from pbr would be in this project's best interest.

add config option for "collapse"

By default "local" links on other pages are not shown, only the page title is included. Add an option to expand all local links in all pages.

make_toctree Not JSON serializable

I'm running into problems when building documentation on Read the Docs. The command being used is:

sphinx-build -T -b json -d _build/doctrees-json -D language=en . _build/json

This results in an error that states that:

TypeError: <function html_page_context.<locals>.make_toctree at 0x10d954510> is not JSON serializable

The full output:

Running Sphinx v1.3.1
loading translations [en]... done
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [json]: targets for 4 source files that are out of date
updating environment: 4 added, 0 changed, 0 removed
reading sources... [100%] usage                                                                                                                                                   
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 25%] index                                                                                                                                                    
Traceback (most recent call last):
  File "python3.4/site-packages/sphinx/cmdline.py", line 245, in main
    app.build(opts.force_all, filenames)
  File "python3.4/site-packages/sphinx/application.py", line 264, in build
    self.builder.build_update()
  File "python3.4/site-packages/sphinx/builders/__init__.py", line 245, in build_update
    'out of date' % len(to_build))
  File "python3.4/site-packages/sphinx/builders/__init__.py", line 316, in build
    self.write(docnames, list(updated_docnames), method)
  File "python3.4/site-packages/sphinx/builders/__init__.py", line 354, in write
    self._write_serial(sorted(docnames), warnings)
  File "python3.4/site-packages/sphinx/builders/__init__.py", line 362, in _write_serial
    self.write_doc(docname, doctree)
  File "python3.4/site-packages/sphinx/builders/html.py", line 445, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "python3.4/site-packages/sphinx/builders/html.py", line 1082, in handle_page
    self.dump_context(ctx, outfilename)
  File "python3.4/site-packages/sphinx/builders/html.py", line 1064, in dump_context
    self.implementation.dump(context, f, *self.additional_dump_args)
  File "python3.4/site-packages/sphinx/util/jsonimpl.py", line 28, in dump
    return json.dump(obj, fp, *args, **kwds)
  File "python3.4/json/__init__.py", line 178, in dump
    for chunk in iterable:
  File "python3.4/json/encoder.py", line 422, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "python3.4/json/encoder.py", line 396, in _iterencode_dict
    yield from chunks
  File "python3.4/json/encoder.py", line 429, in _iterencode
    o = _default(o)
  File "python3.4/site-packages/sphinx/util/jsonimpl.py", line 23, in default
    return json.JSONEncoder.default(self, obj)
  File "python3.4/json/encoder.py", line 173, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <function html_page_context.<locals>.make_toctree at 0x10d954510> is not JSON serializable

Exception occurred:
  File "python3.4/json/encoder.py", line 173, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <function html_page_context.<locals>.make_toctree at 0x10d954510> is not JSON serializable
The full traceback has been saved in /var/folders/44/znmnm9yd1xz8f98vyb4n3j7w0000gn/T/sphinx-err-d_55ezjk.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

I am running Python 3.4 on Mac OS 10.10 (Yosemite). My current Sphinx extensions are:

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.doctest',
    'sphinx.ext.coverage',
    'sphinx.ext.viewcode',
    'sphinxcontrib.fulltoc',
]

Removing sphinxcontrib.fulltoc removes the problem.

preserve local toc info for template authors

We overwrite the "toc" value in the template context without preserving the old values. We should save them as "localtoc" or something similar so template authors can use the information if they want to.

"TypeError: decoding Unicode is not supported" when trying to install using pip

Hi.

Thank you for sphinxcontrib-fulltoc.

Windows 7 Enterprise 64-bit SP1
Python 2.7.9 (x86-64)

I installed sphinx using pip without error:

>pip install sphinx
Collecting Sphinx                                                                                              
  Downloading Sphinx-1.3.1-py2.py3-none-any.whl (1.3MB)                                                        
    100% |################################| 1.3MB 350kB/s                                                      
Collecting sphinx-rtd-theme<0.2,>=0.1 (from Sphinx)                                                            
  Downloading sphinx_rtd_theme-0.1.8-py2.py3-none-any.whl (418kB)                                              
    100% |################################| 421kB 890kB/s                                                      
Requirement already satisfied (use --upgrade to upgrade): colorama in c:\python27\lib\site-packages (from Sphin
x)                                                                                                             
Collecting snowballstemmer>=1.1 (from Sphinx)                                                                  
  Downloading snowballstemmer-1.2.0.tar.gz (49kB)                                                              
    100% |################################| 53kB 1.6MB/s                                                       
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in c:\python27\lib\site-packages (from Sphin
x)                                                                                                             
Collecting Pygments>=2.0 (from Sphinx)                                                                         
  Downloading Pygments-2.0.2-py2-none-any.whl (672kB)                                                          
    100% |################################| 675kB 203kB/s                                                      
Collecting docutils>=0.11 (from Sphinx)                                                                        
  Downloading docutils-0.12.tar.gz (1.6MB)                                                                     
    100% |################################| 1.6MB 267kB/s                                                      
Collecting babel>=1.3 (from Sphinx)                                                                            
  Downloading Babel-1.3.tar.gz (3.4MB)                                                                         
    100% |################################| 3.4MB 158kB/s                                                      
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.3 in c:\python27\lib\site-packages (from Sp
hinx)                                                                                                          
Collecting alabaster<0.8,>=0.7 (from Sphinx)                                                                   
  Downloading alabaster-0.7.4-py2-none-any.whl                                                                 
Requirement already satisfied (use --upgrade to upgrade): pytz>=0a in c:\python27\lib\site-packages (from babel
>=1.3->Sphinx)                                                                                                 
Requirement already satisfied (use --upgrade to upgrade): markupsafe in c:\python27\lib\site-packages (from Jin
ja2>=2.3->Sphinx)                                                                                              
Installing collected packages: sphinx-rtd-theme, snowballstemmer, Pygments, docutils, babel, alabaster, Sphinx 
  Running setup.py install for snowballstemmer                                                                 
  Running setup.py install for docutils                                                                        
  Running setup.py install for babel                                                                           
Successfully installed Pygments-2.0.2 Sphinx-1.3.1 alabaster-0.7.4 babel-1.3 docutils-0.12 snowballstemmer-1.2.
0 sphinx-rtd-theme-0.1.8                                                                                       

But then when I trying installing sphinxcontrib-fulltoc, I get an error:

>pip install sphinxcontrib-fulltoc
Collecting sphinxcontrib-fulltoc
  Downloading sphinxcontrib-fulltoc-1.1.tar.gz
Installing collected packages: sphinxcontrib-fulltoc
  Running setup.py install for sphinxcontrib-fulltoc
    Complete output from command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\rami~1.abu\\appdata\\local\\temp\\pip-build-mfyh2w\\sphinxcontrib-fulltoc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\rami~1.abu\appdata\local\temp\pip-ienfui-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\sphinxcontrib
    copying sphinxcontrib\fulltoc.py -> build\lib\sphinxcontrib
    copying sphinxcontrib\__init__.py -> build\lib\sphinxcontrib
    running egg_info
    writing sphinxcontrib_fulltoc.egg-info\PKG-INFO
    writing namespace_packages to sphinxcontrib_fulltoc.egg-info\namespace_packages.txt
    writing top-level names to sphinxcontrib_fulltoc.egg-info\top_level.txt
    writing dependency_links to sphinxcontrib_fulltoc.egg-info\dependency_links.txt
    [pbr] Reusing existing SOURCES.txt
    running install_lib
    copying sphinxcontrib/fulltoc.py -> C:\Python27\Lib\site-packages\sphinxcontrib
    Skipping installation of C:\Python27\Lib\site-packages\sphinxcontrib\__init__.py (namespace package)
    byte-compiling C:\Python27\Lib\site-packages\sphinxcontrib\fulltoc.py to fulltoc.pyc
    running install_egg_info
    Copying sphinxcontrib_fulltoc.egg-info to C:\Python27\Lib\site-packages\sphinxcontrib_fulltoc-1.1-py2.7.egg-info
    Installing C:\Python27\Lib\site-packages\sphinxcontrib_fulltoc-1.1-py2.7-nspkg.pth
    running install_scripts
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\rami~1.abu\appdata\local\temp\pip-build-mfyh2w\sphinxcontrib-fulltoc\setup.py", line 29, in <module>
        pbr=True)
      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\pbr\packaging.py", line 203, in run
        return du_install.install.run(self)
      File "C:\Python27\lib\distutils\command\install.py", line 575, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\pbr\packaging.py", line 372, in run
        for args in get_script_args(dist, executable, is_wininst):
      File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1934, in get_script_args
        header = get_script_header("", executable, wininst)
      File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1603, in get_script_header
        if not isascii(hdr):
      File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 86, in isascii
        unicode(s, 'ascii')
    TypeError: decoding Unicode is not supported

    ----------------------------------------
    Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\rami~1.abu\\appdata\\local\\temp\\pip-build-mfyh2w\\sphinxcontrib-fulltoc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\rami~1.abu\appdata\local\temp\pip-ienfui-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\rami~1.abu\appdata\local\temp\pip-build-mfyh2w\sphinxcontrib-fulltoc

Any ideas?

Thank you.

Does not make parallel build support explicit

When doing a parallel build with sphinx-build -j auto ... I get

WARNING: the sphinxcontrib.fulltoc extension does not declare if it is safe for parallel reading,
assuming it isn't - please ask the extension author to check and make it explicit

This is with sphinx 4.4. Does fulltoc support parallel builds?

Can't pip install fulltoc

Hi,

I just added sphixcontrib-fulltoc to my documentation build process. While the install worked great on my Windows desktop, it wont install in an alpine docker container

# docker run -it --rm alpine /bin/ash
/ # apk --no-cache add py2-pip python-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/14) Installing libbz2 (1.0.6-r5)
(2/14) Installing expat (2.2.0-r1)
(3/14) Installing libffi (3.2.1-r3)
(4/14) Installing gdbm (1.12-r0)
(5/14) Installing ncurses-terminfo-base (6.0-r8)
(6/14) Installing ncurses-terminfo (6.0-r8)
(7/14) Installing ncurses-libs (6.0-r8)
(8/14) Installing readline (6.3.008-r5)
(9/14) Installing sqlite-libs (3.18.0-r0)
(10/14) Installing python2 (2.7.13-r1)
(11/14) Installing py-setuptools (33.1.1-r1)
(12/14) Installing py2-pip (9.0.1-r1)
(13/14) Installing pkgconf (1.3.7-r0)
(14/14) Installing python2-dev (2.7.13-r1)
Executing busybox-1.26.2-r5.trigger
OK: 70 MiB in 25 packages
/ # pip install sphinx
Collecting sphinx
  Downloading Sphinx-1.6.3-py2.py3-none-any.whl (1.9MB)
    100% |████████████████████████████████| 1.9MB 36kB/s
Collecting snowballstemmer>=1.1 (from sphinx)
  Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB)
    100% |████████████████████████████████| 71kB 4.4MB/s
Collecting alabaster<0.8,>=0.7 (from sphinx)
  Downloading alabaster-0.7.10-py2.py3-none-any.whl
Collecting Jinja2>=2.3 (from sphinx)
  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
    100% |████████████████████████████████| 348kB 2.5MB/s
Collecting imagesize (from sphinx)
  Downloading imagesize-0.7.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from sphinx)
Collecting babel!=2.0,>=1.3 (from sphinx)
  Downloading Babel-2.5.0-py2.py3-none-any.whl (6.8MB)
    100% |████████████████████████████████| 6.8MB 128kB/s
Collecting Pygments>=2.0 (from sphinx)
  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
    100% |████████████████████████████████| 849kB 726kB/s
Collecting docutils>=0.11 (from sphinx)
  Downloading docutils-0.14-py2-none-any.whl (543kB)
    100% |████████████████████████████████| 552kB 1.7MB/s
Collecting requests>=2.0.0 (from sphinx)
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 4.3MB/s
Collecting six>=1.5 (from sphinx)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting typing; python_version < "3.5" (from sphinx)
  Downloading typing-3.6.2-py2-none-any.whl
Collecting sphinxcontrib-websupport (from sphinx)
  Downloading sphinxcontrib_websupport-1.0.1-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.3->sphinx)
  Downloading MarkupSafe-1.0.tar.gz
Collecting pytz>=0a (from babel!=2.0,>=1.3->sphinx)
  Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 2.0MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0.0->sphinx)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 2.5MB/s
Collecting certifi>=2017.4.17 (from requests>=2.0.0->sphinx)
  Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
    100% |████████████████████████████████| 358kB 1.5MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.0.0->sphinx)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 3.1MB/s
Collecting idna<2.7,>=2.5 (from requests>=2.0.0->sphinx)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 5.2MB/s
Installing collected packages: snowballstemmer, alabaster, MarkupSafe, Jinja2, imagesize, pytz, babel, Pygments, docutils, chardet, certifi, urllib3, idna, requests, six, typing, sphinxcontrib-websupport, sphinx
  Running setup.py install for MarkupSafe ... done
Successfully installed Jinja2-2.9.6 MarkupSafe-1.0 Pygments-2.2.0 alabaster-0.7.10 babel-2.5.0 certifi-2017.7.27.1 chardet-3.0.4 docutils-0.14 idna-2.6 imagesize-0.7.1 pytz-2017.2 requests-2.18.4 six-1.10.0 snowballstemmer-1.2.1 sphinx-1.6.3 sphinxcontrib-websupport-1.0.1 typing-3.6.2 urllib3-1.22
/ # pip install sphinxcontrib-fulltoc
Collecting sphinxcontrib-fulltoc
  Downloading sphinxcontrib-fulltoc-1.2.0.tar.gz
    Complete output from command python setup.py egg_info:

    Installed /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg
    ERROR:root:Error parsing
    Traceback (most recent call last):
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/core.py", line 111, in pbr
        attrs = util.cfg_to_args(path, dist.script_args)
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/util.py", line 267, in cfg_to_args
        wrap_commands(kwargs)
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/util.py", line 569, in wrap_commands
        cmdclass = ep.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/sphinx/setup_command.py", line 23, in <module>
        from sphinx.application import Sphinx
      File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 33, in <module>
        from sphinx.environment import BuildEnvironment
      File "/usr/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 45, in <module>
        from sphinx.util.websupport import is_commentable
      File "/usr/lib/python2.7/site-packages/sphinx/util/websupport.py", line 11, in <module>
        from sphinxcontrib.websupport.utils import is_commentable  # NOQA
      File "/usr/lib/python2.7/site-packages/sphinxcontrib/websupport/__init__.py", line 15, in <module>
        from sphinxcontrib.websupport.core import WebSupport  # NOQA
      File "/usr/lib/python2.7/site-packages/sphinxcontrib/websupport/core.py", line 17, in <module>
        from jinja2 import Environment, FileSystemLoader
      File "/usr/lib/python2.7/site-packages/jinja2/__init__.py", line 33, in <module>
        from jinja2.environment import Environment, Template
      File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 15, in <module>
        from jinja2 import nodes
      File "/usr/lib/python2.7/site-packages/jinja2/nodes.py", line 19, in <module>
        from jinja2.utils import Markup
      File "/usr/lib/python2.7/site-packages/jinja2/utils.py", line 486, in <module>
        MutableMapping.register(LRUCache)
      File "/usr/lib/python2.7/abc.py", line 109, in register
        if issubclass(subclass, cls):
      File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
        if issubclass(subclass, scls):
      File "/usr/lib/python2.7/site-packages/typing.py", line 1265, in __subclasscheck__
        return super(GenericMeta, self).__subclasscheck__(cls)
    TypeError: super() argument 1 must be type, not None
    error in setup command: Error parsing /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/setup.cfg: TypeError: super() argument 1 must be type, not None

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/

Why won't it install?

AttributeError when toctree is :hidden:

I'd like to get the toctree in the sidebar only and not display it in the top of my welcome document.

When I set hidden on the toctree like this:

.. toctree::
:hidden:

And run

make html

I get attribute error
AttributeError: 'NoneType' object has no attribute 'traverse'

When I remove the :hidden: setting, make html generates the documents properly.

Full stack trace:

Sphinx version: 1.2b2

Python version: 2.7.3

Docutils version: 0.11 release

Jinja2 version: 2.7.1

Traceback (most recent call last):
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 247, in main
app.build(force_all, filenames)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/application.py", line 212, in build
self.builder.build_update()
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/init.py", line 214, in build_update
'out of date' % len(to_build))
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/init.py", line 270, in build
self.write(docnames, list(updated_docnames), method)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/init.py", line 313, in write
self._write_serial(sorted(docnames), warnings)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/init.py", line 326, in _write_serial
self.write_doc(docname, doctree)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/html.py", line 439, in write_doc
self.handle_page(docname, ctx, event_arg=doctree)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/builders/html.py", line 760, in handle_page
ctx, event_arg)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/application.py", line 358, in emit
results.append(callback(self, *args))
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinxcontrib/fulltoc.py", line 36, in html_page_context
rendered_toc = get_rendered_toctree(app.builder, pagename)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinxcontrib/fulltoc.py", line 57, in get_rendered_toctree
collapse=collapse,
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinxcontrib/fulltoc.py", line 82, in build_full_toctree
env.resolve_references(result, docname, builder)
File "/home/travis/venv/g2g_test/local/lib/python2.7/site-packages/sphinx/environment.py", line 1311, in resolve_references
for node in doctree.traverse(addnodes.pending_xref):
AttributeError: 'NoneType' object has no attribute 'traverse'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.