readthedocs / blog

Read the Docs blog
https://blog.readthedocs.com
17 stars 56 forks source link

Cannot build blog locally #99

Closed astrojuanlu closed 3 years ago

astrojuanlu commented 3 years ago

I tried creating a virtualenv, installing requirements.txt and make html, which is what the CI seems to do, but I get the following error:

(.venv) juanlu@arion2:~/Projects/RTD/blog$ make html
sphinx-build -b html -d _build/doctrees  -W . _build/html
Running Sphinx v1.7.9
loading pickled environment... not yet created
loading intersphinx inventory from https://docs.readthedocs.io/en/stable/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 221 source files that are out of date
updating environment: 221 added, 0 changed, 0 removed
/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/util/nodes.py:57: FutureWarning:                                                                                                                                      
   The iterable returned by Node.traverse()
   will become an iterator instead of a list in Docutils > 0.16.
  for classifier in reversed(node.parent.traverse(nodes.classifier)):
reading sources... [100%] welcome                                                                                                                                                                                                             
Skipping atom feed link rewrite due to errors...

Warning, treated as error:
/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst:3:Error in "currentmodule" directive:
maximum 1 argument(s) allowed, 3 supplied.

.. currentmodule:: {{ module }}
make: *** [Makefile:53: html] Error 2

I have exactly the same dependencies as this successful CI build: https://github.com/readthedocs/blog/runs/2239735141?check_suite_focus=true

humitos commented 3 years ago

It called my attention why it's using currentmodule directive and autosummary extension. I don't see it installed in the blog. BTW, I ran make html from master and it built correctly locally with a new virtualenv and the requirements installed from this repository, so :shrug:

astrojuanlu commented 3 years ago

More verbose output:

reading sources... [100%] welcome
[app] emitting event: 'env-purge-doc'(<sphinx.environment.BuildEnvironment object at 0x7f8c3e247510>, 'welcome')
[app] emitting event: 'source-read'('welcome', [".. post:: Aug 7, 2014\n   :tags: welcome\n\n\nWelcome\n=======\n\nWelcome to the Read 
[app] emitting event: 'doctree-read'(<document: <PostNode...><section "welcome"...>>,)

[app] emitting event: 'env-updated'(<sphinx.environment.BuildEnvironment object at 0x7f8c3e247510>,)
[app] emitting event: 'build-finished'(SphinxWarning('/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/ext/autosumm
Skipping atom feed link rewrite due to errors...

Traceback (most recent call last):
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/cmdline.py", line 304, in main
    app.build(args.force_all, filenames)
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/application.py", line 331, in build
    self.builder.build_update()
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 342, in build_update
    'out of date' % len(to_build))
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 355, in build
    updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/util/logging.py", line 240, in pending_warnings
    memhandler.flushTo(logger)
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/util/logging.py", line 206, in flushTo
    logger.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1524, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 890, in handle
    rv = self.filter(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 751, in filter
    result = f.filter(record)
  File "/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/util/logging.py", line 380, in filter
    raise SphinxWarning(location + ":" + message)
sphinx.errors.SphinxWarning: /home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst:3:Error in "currentmodule" directive:
maximum 1 argument(s) allowed, 3 supplied.

.. currentmodule:: {{ module }}

Warning, treated as error:
/home/juanlu/Projects/RTD/blog/.venv/lib/python3.7/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst:3:Error in "currentmodule" directive:
maximum 1 argument(s) allowed, 3 supplied.

.. currentmodule:: {{ module }}
astrojuanlu commented 3 years ago

https://github.com/sphinx-doc/sphinx/issues/1470#issuecomment-68589477

oh well

astrojuanlu commented 3 years ago

@humitos: "I use pyenv and this works" @astrojuanlu: "Give me a break, that can't be the reason!" ...

humitos commented 3 years ago

Haha! I'm sorry, I needed to laugh publicly :joy: