undefined label warning with incorrect line numbers

351 views
Skip to first unread message

werner

unread,
Feb 22, 2011, 8:31:27 AM2/22/11
to sphin...@googlegroups.com
I am getting warnings like this:

C:\dev\dabo\doc\source\dabo.dObject.dObject.rst:157: WARNING: undefined
label: dabo.lib.autosuper.autosuper.autosuper (if the link has no
caption the label must precede a section header)
C:\dev\dabo\doc\source\dabo.dObject.dObject.rst:181: WARNING: undefined
label: dabo.ui.dfont.dfont (if the link has no caption the label must
precede a section header)

In this particular case they are all off by 129, i.e. 157 should be 28 etc.

Noticed in the release notes for 1.0.6 that should be fixed, do I need
to upgrade something?

Werner

This is with Sphinx 1.0.7 on Windows 7 and Python 2.6.5

Guenter Milde

unread,
Feb 26, 2011, 4:25:55 PM2/26/11
to sphin...@googlegroups.com
On 2011-02-22, werner wrote:
> I am getting warnings like this:

> C:\dev\dabo\doc\source\dabo.dObject.dObject.rst:157: WARNING: undefined
> label: dabo.lib.autosuper.autosuper.autosuper (if the link has no
> caption the label must precede a section header)
> C:\dev\dabo\doc\source\dabo.dObject.dObject.rst:181: WARNING: undefined
> label: dabo.ui.dfont.dfont (if the link has no caption the label must
> precede a section header)

> In this particular case they are all off by 129, i.e. 157 should be 28 etc.

> Noticed in the release notes for 1.0.6 that should be fixed, do I need
> to upgrade something?

...

> This is with Sphinx 1.0.7 on Windows 7 and Python 2.6.5

There has been work on a similar problem with the Docutils parser (used
by Sphinx). What is the Docutils version?

Günter

werner

unread,
Feb 26, 2011, 6:35:38 PM2/26/11
to sphin...@googlegroups.com
On 26/02/2011 22:25, Guenter Milde wrote:
...
>> This is with Sphinx 1.0.7 on Windows 7 and Python 2.6.5
> There has been work on a similar problem with the Docutils parser (used
> by Sphinx). What is the Docutils version?
>
0.7

Werner

Guenter Milde

unread,
Feb 28, 2011, 4:44:13 AM2/28/11
to sphin...@googlegroups.com

> 0.7

This is up-to-date, so it seems to point to a still existing system.

Could you try to provide a minimal standalone rst source that shows
the problem with Docutils (rst2html.py, say)?

Günter

werner

unread,
Feb 28, 2011, 6:14:19 AM2/28/11
to sphin...@googlegroups.com
I get this with rst2html:
C:\dev\aaTests\sphinxTest\source>\python26\python
C:\Python26\Lib\site-packages\rst2html.py index.rst index.html
index.rst:149: (ERROR/3) Unknown interpreted text role "ref".
index.rst:150: (ERROR/3) Unknown interpreted text role "ref".
index.rst:151: (ERROR/3) Unknown interpreted text role "ref".
index.rst:152: (ERROR/3) Unknown interpreted text role "ref".
index.rst:153: (ERROR/3) Unknown interpreted text role "ref".
index.rst:149: (ERROR/3) Unknown interpreted text role "ref".
index.rst:150: (ERROR/3) Unknown interpreted text role "ref".

Where as with Sphinx on the same files I get:
C:\dev\aaTests\sphinxTest\source\index.rst:278: WARNING: undefined
label: dabo.dapp (if the link has no caption the label must precede a
section header)
C:\dev\aaTests\sphinxTest\source\index.rst:279: WARNING: undefined
label: dabo.dobject (if the link has no caption the label must precede a
section header)
C:\dev\aaTests\sphinxTest\source\index.rst:280: WARNING: undefined
label: dabo.dreportwriter (if the link has no caption the label must
precede a section header)
C:\dev\aaTests\sphinxTest\source\index.rst:281: WARNING: undefined
label: dabo.dsecuritymanager (if the link has no caption the label must
precede a section header)
C:\dev\aaTests\sphinxTest\source\index.rst:282: WARNING: undefined
label: dabo.dusersettingprovider (if the link has no caption the label

must precede a section header)

I can provide you a small ZIP (230kb) with the .rst etc I used for this,
if that would help.

Werner

Guenter Milde

unread,
Mar 1, 2011, 2:17:27 AM3/1/11
to sphin...@googlegroups.com
On 2011-02-28, werner wrote:
> On 28/02/2011 10:44, Guenter Milde wrote:
>> On 2011-02-26, werner wrote:
>>> On 26/02/2011 22:25, Guenter Milde wrote:
>>> ...
>>>>> This is with Sphinx 1.0.7 on Windows 7 and Python 2.6.5
>>>> There has been work on a similar problem with the Docutils parser (used
>>>> by Sphinx). What is the Docutils version?
>>> 0.7
>> This is up-to-date, so it seems to point to a still existing system.

>> Could you try to provide a minimal standalone rst source that shows
>> the problem with Docutils (rst2html.py, say)?

> I get this with rst2html:
> C:\dev\aaTests\sphinxTest\source>\python26\python
> C:\Python26\Lib\site-packages\rst2html.py index.rst index.html
> index.rst:149: (ERROR/3) Unknown interpreted text role "ref".
> index.rst:150: (ERROR/3) Unknown interpreted text role "ref".

...

Yes, the :ref: role is a Sphinx extension, so if the line numbers are
correct, this is intended behaviour.

> Where as with Sphinx on the same files I get:
> C:\dev\aaTests\sphinxTest\source\index.rst:278: WARNING: undefined
> label: dabo.dapp (if the link has no caption the label must precede a
> section header)
> C:\dev\aaTests\sphinxTest\source\index.rst:279: WARNING: undefined
> label: dabo.dobject (if the link has no caption the label must precede a
> section header)

...

It seems like the fix for line-numbers with/after included files was
not ported to the Sphinx extensions to Docutils.

I suggest to report this bug to the Sphinx bug tracker.

Günter


werner

unread,
Mar 1, 2011, 5:20:33 AM3/1/11
to sphin...@googlegroups.com
> G�nter
>
>
Done #648

Werner

Paulette

unread,
Mar 2, 2011, 10:55:57 AM3/2/11
to sphinx-dev


On Mar 1, 2:17 am, Guenter Milde <mi...@users.berlios.de> wrote:
> On 2011-02-28, werner wrote:
> > On 28/02/2011 10:44, Guenter Milde wrote:
> >> On 2011-02-26, werner wrote:
> >>> On 26/02/2011 22:25, Guenter Milde wrote:
> >>> ...
> >>>>> This is with Sphinx 1.0.7 on Windows 7 and Python 2.6.5
> >>>> There has been work on a similar problem with the Docutils parser (used
> >>>> by Sphinx). What is the Docutils version?
> >>> 0.7
> >> This is up-to-date, so it seems to point to a still existing system.
> >> Could you try to provide a minimal standalone rst source that shows
> >> the problem with Docutils (rst2html.py, say)?
> > I get this with rst2html:
> > C:\dev\aaTests\sphinxTest\source>\python26\python
> > C:\Python26\Lib\site-packages\rst2html.py index.rst index.html
> > index.rst:149: (ERROR/3) Unknown interpreted text role "ref".
> > index.rst:150: (ERROR/3) Unknown interpreted text role "ref".
>
> ...
>
> Yes, the :ref: role is a Sphinx extension, so if the line numbers are
> correct, this is intended behaviour.
>
Is there any way to suppress these warnings? I posted a couple weeks
ago about warnings I was get in 1.0.7 that I never got before. I
cannot fix anything to eliminated these undefined label warnings
because they refer to a package that is imported and I cannot change.
I don't want to move the project to 1.0.7 because the programmers
don't want to see 5 warnings every time they build.

Paulette
Reply all
Reply to author
Forward
0 new messages