Sphinx: "WARNING: 'viewcode' reference target not found"

Created on 8 Jun 2020  路  3Comments  路  Source: sphinx-doc/sphinx

Describe the bug

Django uses the sphinx.ext.viewcode extension and sphinxcontrib-spelling. They don't work properly with Sphinx 3.1. It's a regression in 5f51a1e63f9442439466b7acede87ad21d49bdc0 (reverting this commit fixes builds for us).

To Reproduce
Steps to reproduce the behavior:

sphinx-build -b spelling -n -d _build/doctrees -D language=   . _build/html

Expected behavior
Warnings shouldn't be raised.

Your project
https://github.com/django/django/tree/master/docs

Environment info

  • OS: Linux
  • Python version: 3.6.9
  • Sphinx version: 3.1.0
  • Sphinx extensions: ['sphinx.ext.extlinks', sphinx.ext.intersphinx, sphinx.ext.viewcode, sphinx.ext.autosectionlabel]

Additional context
Logs

bug

Most helpful comment

I'm sorry. I missed this issue on working for 3.1.1. I'll check this until the next bugfix release. Please wait just a little more.

All 3 comments

I'm sorry. I missed this issue on working for 3.1.1. I'll check this until the next bugfix release. Please wait just a little more.

Thanks!

Note: I used following Dockerfile to reproduce the error:

FROM python:3.7-slim

RUN apt update; apt install -y git make build-essential vim
RUN git clone https://github.com/django/django
WORKDIR /django
RUN pip install -e .
RUN pip install -U sphinx
WORKDIR /django/docs
RUN pip install sphinxcontrib-spelling
RUN apt install -y enchan
RUN sphinx-build -b spelling -n -d _build/doctrees -D language=   . _build/html
Was this page helpful?
0 / 5 - 0 ratings