Building Nengo Core documentation sphinx error

I am trying to build the nengo documentation using sphinx in order to contribute it as a docset to Dash (https://github.com/Kapeli/Dash-User-Contributions#contribute-a-new-docset) but when running:

sphinx-build -vW docs docs/_build

I get:

Traceback (most recent call last):
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/cmd/build.py”, line 280, in build_main
app.build(args.force_all, filenames)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/application.py”, line 348, in build
self.builder.build_update()
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/builders/init.py”, line 299, in build_update
len(to_build))
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/builders/init.py”, line 361, in build
self.write(docnames, list(updated_docnames), method)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/builders/init.py”, line 535, in write
self._write_serial(sorted(docnames))
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/builders/init.py”, line 545, in _write_serial
self.write_doc(docname, doctree)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/contextlib.py”, line 119, in exit
next(self.gen)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/util/logging.py”, line 213, in pending_warnings
memhandler.flushTo(logger)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/util/logging.py”, line 178, in flushTo
logger.handle(record)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/logging/init.py”, line 1524, in handle
self.callHandlers(record)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/logging/init.py”, line 1586, in callHandlers
hdlr.handle(record)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/logging/init.py”, line 890, in handle
rv = self.filter(record)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/logging/init.py”, line 751, in filter
result = f.filter(record)
File “/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/sphinx/util/logging.py”, line 421, in filter
raise exc
sphinx.errors.SphinxWarning: /Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/nengo/nengo/utils/stdlib.py:docstring of nengo.utils.stdlib.WeakKeyIDDictionary.get::py:class reference target not found: D[k] if k in D, else d. d defaults to None.

Warning, treated as error:
/Users/thomastiotto/opt/anaconda3/envs/nengodev/lib/python3.7/site-packages/nengo/nengo/utils/stdlib.py:docstring of nengo.utils.stdlib.WeakKeyIDDictionary.get::py:class reference target not found: D[k] if k in D, else d. d defaults to None.

I have tried adding something like nitpick_ignore = [('py:class', 'D')] to sphinx’s conf.py but to no avail.

Hi @Tioz. This looks to be due to some Sphinx updates. It is a very recent error that only just started happening in the master build a couple days ago, and has been fixed in https://github.com/nengo/nengo/pull/1623 (not yet merged). Specifically see the commit titled “Add docstrings to WeakKeyIDDictionary”. You could do a git fetch && git cherry-pick c92678f12361673170cacf9842a36565eb553c1a (at time of writing this) if you wish to pull this commit into your branch.

Contributed to Dash! Thanks :slight_smile: