Skip to content

Regression? ModuleNotFoundError: No module named 'mkdocstrings.handlers.python' #436

@posita

Description

@posita

Despite no related changes to docs, this recently emerged here: https://github.com/posita/numerary/runs/6643470439?check_suite_focus=true#step:4:127

ERROR    -  Error reading page 'numerary.md': No module named 'mkdocstrings.handlers.python'
  Traceback (most recent call last):
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 563, in get_handler
      module = importlib.import_module(f"mkdocstrings_handlers.{name}")
    File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'mkdocstrings_handlers'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/runner/work/numerary/numerary/.tox/check/bin/mkdocs", line 8, in <module>
      sys.exit(cli())
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
      return self.main(*args, **kwargs)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/click/core.py", line 1055, in main
      rv = self.invoke(ctx)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/click/core.py", line 760, in invoke
      return __callback(*args, **kwargs)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocs/__main__.py", line 192, in build_command
      build.build(config.load_config(**kwargs), dirty=not clean)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocs/commands/build.py", line 292, in build
      _populate_page(file.page, config, files, dirty)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocs/commands/build.py", line 1[74](https://github.com/posita/numerary/runs/6643470439?check_suite_focus=true#step:4:75), in _populate_page
      page.render(config, files)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocs/structure/pages.py", line 175, in render
      self.content = md.convert(self.markdown)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/markdown/core.py", line 264, in convert
      root = self.parser.parseDocument(self.lines).getroot()
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/markdown/blockparser.py", line 90, in parseDocument
      self.parseChunk(self.root, '\n'.join(lines))
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/markdown/blockparser.py", line 105, in parseChunk
      self.parseBlocks(parent, text.split('\n\n'))
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/markdown/blockparser.py", line 123, in parseBlocks
      if processor.run(parent, blocks) is not False:
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocstrings/extension.py", line 121, in run
      html, handler, data = self._process_block(identifier, block, heading_level)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocstrings/extension.py", line 175, in _process_block
      handler = self._handlers.get_handler(handler_name, handler_config)
    File "/home/runner/work/numerary/numerary/.tox/check/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 565, in get_handler
      module = importlib.import_module(f"mkdocstrings.handlers.{name}")
    File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'mkdocstrings.handlers.python'

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmedThis bug was not reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions