Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-18496

Documenteer crashes on ConfigurableWrapper in registry

    Details

    • Type: Bug
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: documenteer
    • Labels:
      None
    • Templates:
    • Team:
      SQuaRE

      Description

      If I try to build package-level documentation on verify:tickets/DM-18490-transfer, it crashes with the following stack trace:

      Running Sphinx v1.7.9
      making output directory...
      loading pickled environment... not yet created
      loading intersphinx inventory from https://docs.python.org/3/objects.inv...
      loading intersphinx inventory from https://docs.scipy.org/doc/numpy/objects.inv...
      loading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv...
      loading intersphinx inventory from https://matplotlib.org/objects.inv...
      loading intersphinx inventory from http://scikit-learn.org/stable/objects.inv...
      intersphinx inventory has moved: http://scikit-learn.org/stable/objects.inv -> https://scikit-learn.org/stable/objects.inv
      loading intersphinx inventory from http://pandas.pydata.org/pandas-docs/stable/objects.inv...
      loading intersphinx inventory from http://docs.astropy.org/en/v3.0.x/objects.inv...
      [autosummary] generating autosummary for: index.rst, lsst.verify/index.rst, lsst.verify/inspect_job.rst, lsst.verify/tasks/lsst.verify.gen2tasks.MetricTask.rst, lsst.verify/tasks/lsst.verify.gen2tasks.MetricsControllerTask.rst, lsst.verify/tasks/lsst.verify.gen2tasks.SquashMetadataTask.rst, lsst.verify/tasks/lsst.verify.tasks.ConfigPpdbLoader.rst, lsst.verify/tasks/lsst.verify.tasks.MetadataMetricTask.rst, lsst.verify/tasks/lsst.verify.tasks.PpdbMetricTask.rst, lsst.verify/tasks/lsst.verify.tasks.TimingMetricTask.rst
      [automodsumm] lsst.verify/index.rst: found 51 automodsumm entries to generate
      building [mo]: all of 0 po files
      building [html]: all source files
      updating environment: 61 added, 0 changed, 0 removed
      reading sources... [  8%] lsst.verify/tasks/lsst.verify.gen2tasks.MetricsControllerTask                                                       
      Traceback (most recent call last):
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/documenteer/sphinxrunner.py", line 85, in run_sphinx
          app.build(force_all, filenames)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/application.py", line 325, in build
          self.builder.build_all()
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 299, in build_all
          self.build(None, summary='all source files', method='all')
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 355, in build
          updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 568, in update
          self._read_serial(docnames, self.app)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 587, in _read_serial
          self.read_doc(docname, app)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 662, in read_doc
          doctree = read_doc(self.app, self, self.doc2path(docname))
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/io.py", line 302, in read_doc
          pub.publish()
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/core.py", line 217, in publish
          self.settings)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/readers/__init__.py", line 72, in read
          self.parse()
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/readers/__init__.py", line 78, in parse
          self.parser.parse(self.input, document)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/sphinx/parsers.py", line 85, in parse
          self.statemachine.run(inputstring, document, inliner=self.inliner)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 170, in run
          input_source=document['source'])
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
          context, state, transitions)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
          return method(match, context, next_state)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2980, in text
          self.section(title.lstrip(), source, style, lineno + 1, messages)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 326, in section
          self.new_subsection(title, lineno, messages)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 394, in new_subsection
          node=section_node, match_titles=True)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
          node=node, match_titles=match_titles)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 195, in run
          results = StateMachineWS.run(self, input_lines, input_offset)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
          context, state, transitions)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
          return method(match, context, next_state)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2745, in underline
          self.section(title, source, style, lineno - 1, messages)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 326, in section
          self.new_subsection(title, lineno, messages)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 394, in new_subsection
          node=section_node, match_titles=True)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
          node=node, match_titles=match_titles)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 195, in run
          results = StateMachineWS.run(self, input_lines, input_offset)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
          context, state, transitions)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
          return method(match, context, next_state)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2318, in explicit_markup
          nodelist, blank_finish = self.explicit_construct(match)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2330, in explicit_construct
          return method(self, expmatch)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2073, in directive
          directive_class, match, type_name, option_presets)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2122, in run_directive
          result = directive_instance.run()
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/documenteer/sphinxext/lssttasks/configfieldlists.py", line 166, in run
          self.lineno)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/documenteer/sphinxext/lssttasks/configfieldlists.py", line 308, in wrapped_formatter
          nodes = formatter(*args, **kwargs)
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/documenteer/sphinxext/lssttasks/configfieldlists.py", line 933, in format_registryfield_nodes
          name = '.'.join((choice_class.__module__, choice_class.__name__))
      AttributeError: 'ConfigurableWrapper' object has no attribute '__name__'
       
      Exception occurred:
        File "[redacted]/lsstsw3/miniconda/lib/python3.6/site-packages/documenteer/sphinxext/lssttasks/configfieldlists.py", line 933, in format_registryfield_nodes
          name = '.'.join((choice_class.__module__, choice_class.__name__))
      AttributeError: 'ConfigurableWrapper' object has no attribute '__name__'
      The full traceback has been saved in /tmp/sphinx-err-kx6jxwq_.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.
      A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
      

      I have confirmed that the error disappears if I remove the @registerMultiple decorator from lsst.verify.tasks.commonMetrics.TimingMetricTask. This decorator modifies a package-private registry which is used to initialize lsst.verify.gen2tasks.metricsControllerTask.MetricsControllerConfig.measurers. The registry is not directly accessible through the package API and was not intended to be user-visible.

      The error occurs if and only if the "Retargetable subtasks" section of the the MetricsControllerTask topic page exists, suggesting it appears when trying to generate an entry for MetricsControllerConfig.measurers.

      This error does not appear when building verify:tickets/DM-16536, which is essentially identical except for the presence of TimingMetricTask.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jsick Jonathan Sick
                Reporter:
                krzys Krzysztof Findeisen
                Watchers:
                Jonathan Sick, Krzysztof Findeisen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel