2

I'm using Sphinx 2.2.2 to debug a Sphinx document with a large new source file that contains many cross-references. I get this message:

Warning, treated as error:
C:\Users\...\<filename>.rst::Anonymous hyperlink mismatch: 15 references but 0 targets.
See "backrefs" attribute for IDs.
ERROR: Error while building Main - External manual !

I know roughly what it means: 15 anonymous cross-references point to undefined targets (or perhaps all point to a single undefined target). But how can I find them?

It says I'm supposed to see the "backrefs" attribute for "IDs," which presumably would help me find the problem references. But I don't know what the "backrefs" attribute is, or what it's an attribute of, or how to access it, or what the "IDs" are and what to do with them once I find them.

I've searched the web for references to "backrefs" but didn't find anything that was relevant and comprehensible. Can anyone help?

Jonathan Sachs
  • 161
  • 1
  • 3

1 Answers1

3

I had the same issue, it seems my anonymous hyperlinks were not correctly formatted (in your case, 15 are not correctly formatted).

Double check:

  • `foo<http://foo.bar/>`__ : wrong
  • `foo http://foo.bar/>`__ : wrong
  • `foo <http://foo.bar/>`__ : correct

Hope it helps

etiennedm
  • 139
  • 4
  • To anyone facing this issue, you MUST try the above answer. Make sure the structure is exactly the way it should be. In my case, i was missing a closing angular bracket. Adding it solved it. – P S Solanki Mar 04 '22 at 09:07