Comment 2 for bug 905500

Revision history for this message
Jason Conti (jconti) wrote :

Looking at distutils/command/check.py , it subclasses Reporter from docutils/utils.py in python-doctutils to override the system_message method (I guess to stop it from writing output and raising exceptions). But the original system_message method returns a nodes.system_message object, which is used later in docutils/parsers/rst/states.py also in the python-docutils package, and fails because the value is None.

The system message that it is failing on (using https://bitbucket.org/techtonik/python-pager/raw/b8dba77eb4aa/README.rst ) is:

Unknown interpreted text role "func". (at debug level 3)

There is also a previous system message that makes it through before raising the TypeError (at debug level 1):

No role entry for "func" in module "docutils.parsers.rst.languages.en".
Trying "func" as canonical role name.

The fix may be as simple as appending:

return nodes.system_message(message, level=level, type=self.levels[level], *children, **kwargs)

to the system_message method in the SilentReporter class in distutils/command/check.py. This should probably be reported upstream (if it isn't already) so they can take a look at it and work out a proper fix.