[Python-apps-team] Bug#706585: phatch: FTBFS with Sphinx 1.2: TypeError: __repr__ returned non-string (type NoneType)

Jakub Wilk jwilk at debian.org
Wed May 1 23:10:26 UTC 2013


Source: phatch
Version: 0.2.7.1-1
Severity: important
User: python-modules-team at lists.alioth.debian.org
Usertags: sphinx1.2

When rebuilt against python-sphinx 1.2~b1+dfsg-1 (available in 
experimental), phatch failed to build from source:
| sphinx-build -b html -d build/doctrees   source build/html
| Making output directory...
| Running Sphinx v1.2b1
| loading pickled environment... not yet created
| building [html]: targets for 165 source files that are out of date
| updating environment: 165 added, 0 changed, 0 removed
| reading sources... [  0%] actions
| reading sources... [  1%] actions.autocontrast
| reading sources... [  1%] actions.background
[…]
| reading sources... [ 36%] core.config
| reading sources... [ 37%] core.ct
| reading sources... [ 38%] core.message
|
| Exception occurred:
|   File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 349, in emit
|     self.debug2('[app] emitting event: %r%s', event, repr(args)[:100])
| TypeError: __repr__ returned non-string (type NoneType)
| The full traceback has been saved in /tmp/sphinx-err-yCGbfU.log, if you want to report the issue to the developers.
| Please also report this if it was a user error, so that a better error message can be provided next time.
| Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-users/>,
| or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
| make[1]: *** [html] Error 1

The full traceback was:
| Traceback (most recent call last):
|   File "/usr/lib/pymodules/python2.7/sphinx/cmdline.py", line 247, in main
|     app.build(force_all, filenames)
|   File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 211, in build
|     self.builder.build_update()
|   File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 211, in build_update
|     'out of date' % len(to_build))
|   File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 231, in build
|     purple, length):
|   File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 131, in status_iterator
|     for item in iterable:
|   File "/usr/lib/pymodules/python2.7/sphinx/environment.py", line 458, in update_generator
|     self.read_doc(docname, app=app)
|   File "/usr/lib/pymodules/python2.7/sphinx/environment.py", line 606, in read_doc
|     pub.publish()
|   File "/usr/lib/pymodules/python2.7/docutils/core.py", line 211, in publish
|     self.settings)
|   File "/usr/lib/pymodules/python2.7/docutils/readers/__init__.py", line 69, in read
|     self.parse()
|   File "/usr/lib/pymodules/python2.7/docutils/readers/__init__.py", line 75, in parse
|     self.parser.parse(self.input, document)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/__init__.py", line 157, in parse
|     self.statemachine.run(inputlines, document, inliner=self.inliner)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 170, in run
|     input_source=document['source'])
|   File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
|     context, state, transitions)
|   File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
|     return method(match, context, next_state)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2709, in underline
|     self.section(title, source, style, lineno - 1, messages)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 329, in section
|     self.new_subsection(title, lineno, messages)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 398, in new_subsection
|     node=section_node, match_titles=1)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 284, in nested_parse
|     node=node, match_titles=match_titles)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 195, in run
|     results = StateMachineWS.run(self, input_lines, input_offset)
|   File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
|     context, state, transitions)
|   File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
|     return method(match, context, next_state)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2283, in explicit_markup
|     nodelist, blank_finish = self.explicit_construct(match)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2295, in explicit_construct
|     return method(self, expmatch)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2036, in directive
|     directive_class, match, type_name, option_presets)
|   File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2087, in run_directive
|     result = directive_instance.run()
|   File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 1346, in run
|     documenter.generate(more_content=self.content)
|   File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 755, in generate
|     self.document_members(all_members)
|   File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 648, in document_members
|     for (mname, member, isattr) in self.filter_members(members, want_all):
|   File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 616, in filter_members
|     not keep, self.options)
|   File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 357, in emit_firstresult
|     for result in self.emit(event, *args):
|   File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 349, in emit
|     self.debug2('[app] emitting event: %r%s', event, repr(args)[:100])
| TypeError: __repr__ returned non-string (type NoneType)

The object whose __repr__() returned None was an instance of the lib.events.Sender class.

-- 
Jakub Wilk



More information about the Python-apps-team mailing list