Discussion:
[Docutils-users] (I'm not subscribed) Fwd: traceback error report for `KeyError: 'refid'`
Jeroen Wiert Pluimers
2015-06-09 06:32:08 UTC
Permalink
Just read at http://docutils.sourceforge.net/docs/user/mailing-lists.html
that my previous email might not have reached the list as I'm not
subscribed so I should send to Docutils-***@lists.sourceforge.net

Note that my gmail address goes around my hosts spam filters, so that is a
better place to CC.

Groet,
--
Jeroen W. Pluimers - specialist in .NET, Win32, SQL, Visual Studio & Delphi
tel: +31 20 610 8322
fax: +31 20 610 8323
GSM: +31 654 385 135
mailto:***@pluimers.com
Pluimers Software Ontwikkeling BV, Amsterdam, Trade-register 34152606
http://www.pluimers.com

---------- Forwarded message ----------
From: Jeroen Pluimers <***@pluimers.com>
Date: Mon, Jun 8, 2015 at 11:01 PM
Subject: traceback error report for `KeyError: 'refid'`
To: docutils-***@lists.sf.net



File having issues:
https://raw.githubusercontent.com/jpluimers/OpenSuSE.Tumbleweed.Server-Install/master/README.rst

$ rst2html.py README.rst readme.html
README.rst:292: (ERROR/3) Too many autonumbered footnote references: only 0
corresponding footnotes available.
KeyError: 'refid'
Exiting due to error. Use "--traceback" to diagnose.
Please report errors to <docutils-***@lists.sf.net>.
Include "--traceback" output, Docutils version (0.12 [release]),
Python version (2.7.5), your OS type & version, and the
command line used.


$ rst2html.py README.rst readme.html --traceback
README.rst:292: (ERROR/3) Too many autonumbered footnote references: only 0
corresponding footnotes available.
Traceback (most recent call last):
File "/usr/local/bin/rst2html.py", line 23, in <module>
publish_cmdline(writer_name='html', description=description)
File "/Library/Python/2.7/site-packages/docutils/core.py", line 352, in
publish_cmdline
config_section=config_section, enable_exit_status=enable_exit_status)
File "/Library/Python/2.7/site-packages/docutils/core.py", line 219, in
publish
output = self.writer.write(self.document, self.destination)
File "/Library/Python/2.7/site-packages/docutils/writers/__init__.py",
line 80, in write
self.translate()
File
"/Library/Python/2.7/site-packages/docutils/writers/html4css1/__init__.py",
line 176, in translate
self.document.walkabout(visitor)
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
if child.walkabout(visitor):
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
if child.walkabout(visitor):
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
if child.walkabout(visitor):
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
if child.walkabout(visitor):
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 166, in
walkabout
visitor.dispatch_visit(self)
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 1882, in
dispatch_visit
return method(node)
File
"/Library/Python/2.7/site-packages/docutils/writers/html4css1/__init__.py",
line 986, in visit_footnote_reference
href = '#' + node['refid']
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 567, in
__getitem__
return self.attributes[key]
KeyError: 'refid'


Groet,
--
Jeroen W. Pluimers - specialist in .NET, Win32, SQL, Visual Studio & Delphi
tel: +31 20 610 8322
fax: +31 20 610 8323
GSM: +31 654 385 135
mailto:***@pluimers.com
BeSharp.net is a trademark of Pluimers Software Ontwikkeling BV, Amsterdam,
Trade-register 34152606
http://wiert.me ; http://jwpluimers.myplaxo.com/
Guenter Milde
2015-06-15 15:36:47 UTC
Permalink
Thank you for your report,
Post by Jeroen Wiert Pluimers
https://raw.githubusercontent.com/jpluimers/OpenSuSE.Tumbleweed.Server-Install/master/README.rst
The current version of this file (2015-06-15) compiles without problems here
(rst2html (Docutils 0.13 [repository], Python 2.7.10, on linux2))
Post by Jeroen Wiert Pluimers
$ rst2html.py README.rst readme.html
README.rst:292: (ERROR/3) Too many autonumbered footnote references: only 0
corresponding footnotes available.
It seems the footnote-text/footnote-reference mismatch was solved in the
meantime.
Post by Jeroen Wiert Pluimers
KeyError: 'refid'
Exiting due to error. Use "--traceback" to diagnose.
...

This seems to be an aftereffect.
I did not encounter this in a minimal test, though.
Do you still have a file that exhibits the KeyError on compiling?

...
...
Post by Jeroen Wiert Pluimers
File
"/Library/Python/2.7/site-packages/docutils/writers/html4css1/__init__.py",
line 986, in visit_footnote_reference
href = '#' + node['refid']
File "/Library/Python/2.7/site-packages/docutils/nodes.py", line 567, in
__getitem__
return self.attributes[key]
KeyError: 'refid'
Unfortunately, I don't know how we landed here with a footnote-reference
node without refid. and what should/could be done to it.

Thanks,
Günter

Loading...