Issues

Issue #237 duplicate

Autodoc problem with TypeError

zabsko
created an issue

Making html code in SA project in most cases produces sth like that:

{{{ zaba@SRW001:~/zosia/zosia/public/docs$ make html sphinx-build -b html -d _build/doctrees . _build/html Running Sphinx v0.6.2 loading pickled environment... done building [html]: targets for 1 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] test
Exception occurred: File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/registry.py", line 194, in _current_obj 'thread' % self.__name) TypeError: No object (name: G) has been registered for this thread The full traceback has been saved in /tmp/sphinx-err-3f_Bgz.log, if you want to report the issue to the author. Please also report this if it was a user error, so that a better error message can be provided next time. Send reports to sphinx-dev@googlegroups.com. Thanks! make: *** [html] Błąd 1

}}}

Mentioned error file here:

{{{ zaba@SRW001:~/zosia/zosia/public/docs$ make html sphinx-build -b html -d _build/doctrees . _build/html Running Sphinx v0.6.2 loading pickled environment... done building [html]: targets for 1 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] test
Exception occurred: File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/registry.py", line 194, in _current_obj 'thread' % self._name) TypeError: No object (name: G) has been registered for this thread The full traceback has been saved in /tmp/sphinx-err-3f_Bgz.log, if you want to report the issue to the author. Please also report this if it was a user error, so that a better error message can be provided next time. Send reports to sphinx-dev@googlegroups.com. Thanks! make: *** [html] Błąd 1 zaba@SRW001:~/zosia/zosia/public/docs$ more /tmp/sphinx-err-3f_Bgz.log Traceback (most recent call last): File "/usr/lib/pymodules/python2.5/sphinx/cmdline.py", line 172, in main app.build(all_files, filenames) File "/usr/lib/pymodules/python2.5/sphinx/application.py", line 130, in build self.builder.build_update() File "/usr/lib/pymodules/python2.5/sphinx/builders/init.py", line 265, in build_update 'out of date' % len(to_build)) File "/usr/lib/pymodules/python2.5/sphinx/builders/init.py", line 285, in build purple, length): File "/usr/lib/pymodules/python2.5/sphinx/builders/init.py", line 131, in status_iterator for item in iterable: File "/usr/lib/pymodules/python2.5/sphinx/environment.py", line 519, in update_generator self.read_doc(docname, app=app) File "/usr/lib/pymodules/python2.5/sphinx/environment.py", line 610, in read_doc pub.publish() File "/usr/lib/pymodules/python2.5/docutils/core.py", line 204, in publish self.settings) File "/usr/lib/pymodules/python2.5/docutils/readers/init.py", line 69, in read self.parse() File "/usr/lib/pymodules/python2.5/docutils/readers/init.py", line 75, in parse self.parser.parse(self.input, document) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/init.py", line 157, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 170, in run input_source=document['source']) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 232, in run context, state, transitions) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 420, in check_line return method(match, context, next_state) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 2658, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 308, in section self.new_subsection(title, lineno, messages) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 376, in new_subsection node=section_node, match_titles=1) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 266, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 232, in run context, state, transitions) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 420, in check_line return method(match, context, next_state) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 2658, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 308, in section self.new_subsection(title, lineno, messages) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 376, in new_subsection node=section_node, match_titles=1) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 266, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 232, in run context, state, transitions) File "/usr/lib/pymodules/python2.5/docutils/statemachine.py", line 420, in check_line return method(match, context, next_state) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 2239, in explicit_markup nodelist, blank_finish = self.explicit_construct(match) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 2251, in explicit_construct return method(self, expmatch) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 1994, in directive directive_class, match, type_name, option_presets) File "/usr/lib/pymodules/python2.5/docutils/parsers/rst/states.py", line 2043, in run_directive result = directive_instance.run() File "/usr/lib/pymodules/python2.5/sphinx/ext/autodoc.py", line 1072, in run documenter.generate(more_content=self.content) File "/usr/lib/pymodules/python2.5/sphinx/ext/autodoc.py", line 617, in generate if not self.import_object(): File "/usr/lib/pymodules/python2.5/sphinx/ext/autodoc.py", line 327, in import_object import(self.modname) File "/home/zaba/zosia/zosia/controllers/sedan_collection.py", line 3, in <module> from zosia.lib.sedan.file_saver import File "/home/zaba/zosia/zosia/lib/sedan/file_saver.py", line 2, in <module> from zosia.lib.sedan.sql import File "/home/zaba/zosia/zosia/lib/sedan/sql.py", line 4, in <module> from zosia.lib.workflow import processRequest File "/home/zaba/zosia/zosia/lib/workflow.py", line 7, in <module> from zosia.model.jednostka import * File "/home/zaba/zosia/zosia/model/jednostka.py", line 12, in <module> from zosia.model.obiekt import get_obiekty_from_db as get_obiekty File "/home/zaba/zosia/zosia/model/obiekt.py", line 969, in <module> rodzaje_obiektow_nr = dict([(x, klasy_rodzaje_obiektow[g.rodzaje_obiektow[x]]) for x in g.rodzaje_obiektow if g.rodzaje_obiektow[x] in klasy_rodzaje_obiektow.keys()]) File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/registry.py", line 137, in getattr__ return getattr(self._current_obj(), attr) File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/registry.py", line 194, in _current_obj 'thread' % self._name__) TypeError: No object (name: G) has been registered for this thread

}}}

Is it problem with my own code or with autodoc?

Comments (4)

  1. Log in to comment