Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Error reading page: tuple index out of range #246

Closed
carl-baillargeon opened this issue Mar 4, 2024 · 3 comments
Closed

bug: Error reading page: tuple index out of range #246

carl-baillargeon opened this issue Mar 4, 2024 · 3 comments
Assignees

Comments

@carl-baillargeon
Copy link

Description of the bug

When building our documentation using mkdocs, we are receiving an error for all of our pages on v0.41.2

To Reproduce

In a Python virtual environment:

git clone https://github.com/arista-netdevops-community/anta
cd anta
pip3 install .'[doc]'
mkdocs serve

Full traceback

Full traceback
~/git_projects/anta fix/mkdocs *1 !3mkdocs serve                                                                                                                                                                                     Py .test 3.12.1 carl@ubuntu-dev 11:36:18 AM
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
             - imgs/animated-svg.md
WARNING -  A relative path to 'api/report_manager_models.md' is included in the 'nav' configuration, which is not found in the documentation files.
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Doc file 'usage-inventory-catalog.md' contains a relative link '../api/inventory.md#anta.inventory.AntaInventory', but the target '../api/inventory.md' is not found among documentation files. Did you mean 'api/inventory.md#anta.inventory.AntaInventory'?
WARNING -  Doc file 'usage-inventory-catalog.md' contains a relative link '../api/catalog.md#anta.catalog.AntaCatalog', but the target '../api/catalog.md' is not found among documentation files. Did you mean 'api/catalog.md#anta.catalog.AntaCatalog'?
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
ERROR   -  Error reading page 'advanced_usages/custom-tests.md': tuple index out of range
Traceback (most recent call last):
  File "/home/carl/.pyenv/versions/.test/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/__main__.py", line 270, in serve_command
    serve.serve(**kwargs)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/serve.py", line 86, in serve
    builder(config)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/serve.py", line 67, in builder
    build(config, live_server=None if is_clean else server, dirty=is_dirty)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/build.py", line 322, in build
    _populate_page(file.page, config, files, dirty)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/build.py", line 175, in _populate_page
    page.render(config, files)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/structure/pages.py", line 271, in render
    self.content = md.convert(self.markdown)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/core.py", line 357, in convert
    root = self.parser.parseDocument(self.lines).getroot()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 117, in parseDocument
    self.parseChunk(self.root, '\n'.join(lines))
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 136, in parseChunk
    self.parseBlocks(parent, text.split('\n\n'))
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 158, in parseBlocks
    if processor.run(parent, blocks) is not False:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings/extension.py", line 124, in run
    html, handler, data = self._process_block(identifier, block, heading_level)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings/extension.py", line 206, in _process_block
    data: CollectorItem = handler.collect(identifier, options)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings_handlers/python/handler.py", line 283, in collect
    loader.load(module_name)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/loader.py", line 182, in load
    obj_path, package = self.finder.find_spec(
                        ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/finder.py", line 183, in find_spec
    top_module_name = self._top_module_name(module_path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/finder.py", line 400, in _top_module_name
    top_path = search_path / rel_path.parts[0]
                             ~~~~~~~~~~~~~~^^^
IndexError: tuple index out of range
$ griffe dump ... -LDEBUG
PASTE LOGS HERE
~/git_projects/anta fix/mkdocs *1 ❯ mkdocs build -v                                                                                                                                                                                     Py .test 3.12.1 carl@ubuntu-dev 11:36:34 AM
DEBUG   -  Loading configuration file: /home/carl/git_projects/anta/mkdocs.yml
DEBUG   -  Loaded theme configuration for 'material' from '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/material/templates/mkdocs_theme.yml': {'language': 'en', 'direction': None, 'features': [], 'font': {'text': 'Roboto', 'code': 'Roboto Mono'},
           'icon': None, 'favicon': 'assets/images/favicon.png', 'static_templates': ['404.html']}
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.
DEBUG   -  Config value 'config_file_path' = '/home/carl/git_projects/anta/mkdocs.yml'
DEBUG   -  Config value 'site_name' = 'Arista Network Test Automation - ANTA'
DEBUG   -  Config value 'nav' = [{'Home': 'README.md'}, {'Getting Started': 'getting-started.md'}, {'Installation': 'requirements-and-installation.md'}, {'Inventory & Tests catalog': 'usage-inventory-catalog.md'}, {'Anta CLI': [{'Overview': 'cli/overview.md'}, {'NRFU':
           'cli/nrfu.md'}, {'Execute commands': 'cli/exec.md'}, {'Inventory from CVP': 'cli/inv-from-cvp.md'}, {'Inventory from Ansible': 'cli/inv-from-ansible.md'}, {'Get Inventory Information': 'cli/get-inventory-information.md'}, {'Check': 'cli/check.md'}, {'Helpers':
           'cli/debug.md'}, {'Tag Management': 'cli/tag-management.md'}]}, {'Advanced Usages': [{'Caching in ANTA': 'advanced_usages/caching.md'}, {'Developing ANTA tests': 'advanced_usages/custom-tests.md'}, {'ANTA as a Python Library': 'advanced_usages/as-python-lib.md'}]},
           {'Test Catalog Documentation': [{'Overview': 'api/tests.md'}, {'AAA': 'api/tests.aaa.md'}, {'BFD': 'api/tests.bfd.md'}, {'Configuration': 'api/tests.configuration.md'}, {'Connectivity': 'api/tests.connectivity.md'}, {'Field Notices': 'api/tests.field_notices.md'},
           {'Hardware': 'api/tests.hardware.md'}, {'Interfaces': 'api/tests.interfaces.md'}, {'Logging': 'api/tests.logging.md'}, {'MLAG': 'api/tests.mlag.md'}, {'Multicast': 'api/tests.multicast.md'}, {'Profiles': 'api/tests.profiles.md'}, {'Routing': [{'Generic':
           'api/tests.routing.generic.md'}, {'BGP': 'api/tests.routing.bgp.md'}, {'OSPF': 'api/tests.routing.ospf.md'}]}, {'Security': 'api/tests.security.md'}, {'Services': 'api/tests.services.md'}, {'SNMP': 'api/tests.snmp.md'}, {'STP': 'api/tests.stp.md'}, {'Software':
           'api/tests.software.md'}, {'System': 'api/tests.system.md'}, {'VXLAN': 'api/tests.vxlan.md'}, {'VLAN': 'api/tests.vlan.md'}]}, {'API Documentation': [{'Inventory': [{'Inventory module': 'api/inventory.md'}, {'Inventory models': 'api/inventory.models.input.md'}]},
           {'Test Catalog': 'api/catalog.md'}, {'Device': 'api/device.md'}, {'Test': [{'Test models': 'api/models.md'}, {'Input Types': 'api/types.md'}]}, {'Result Manager': [{'Result Manager module': 'api/result_manager.md'}, {'Result Manager models':
           'api/result_manager_models.md'}]}, {'Report Manager': [{'Report Manager module': 'api/report_manager.md'}, {'Report Manager models': 'api/report_manager_models.md'}]}]}, {'Contributions': 'contribution.md'}, {'FAQ': 'faq.md'}]
DEBUG   -  Config value 'pages' = None
DEBUG   -  Config value 'exclude_docs' = None
DEBUG   -  Config value 'not_in_nav' = None
DEBUG   -  Config value 'site_url' = None
DEBUG   -  Config value 'site_description' = 'Arista Network Test Automation'
DEBUG   -  Config value 'site_author' = 'Khelil Sator'
DEBUG   -  Config value 'theme' = Theme(name='material', dirs=['/home/carl/git_projects/anta/docs/overrides', '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/material/templates',
           '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/templates'], static_templates={'404.html', 'sitemap.xml'}, name='material', locale=Locale('en'), language='en', direction=None, features=['navigation.instant', 'navigation.top',
           'content.tabs.link', 'content.code.copy', 'toc.follow', 'navigation.indexes', 'content.tabs.link'], font={'code': 'Fira Mono'}, icon={'repo': 'fontawesome/brands/github', 'logo': 'fontawesome/solid/network-wired'}, favicon='imgs/favicon.ico', highlightjs=True,
           hljs_languages=['yaml', 'python', 'shell'], include_search_page=False, search_index_only=True, palette=[{'media': '(prefers-color-scheme: light)', 'scheme': 'default', 'primary': 'white', 'accent': 'blue', 'toggle': {'icon': 'material/weather-night', 'name':
           'Switch to dark mode'}}, {'media': '(prefers-color-scheme: dark)', 'scheme': 'slate', 'primary': 'black', 'accent': 'blue', 'toggle': {'icon': 'material/weather-sunny', 'name': 'Switch to light mode'}}])
DEBUG   -  Config value 'docs_dir' = '/home/carl/git_projects/anta/docs'
DEBUG   -  Config value 'site_dir' = '/home/carl/git_projects/anta/site'
DEBUG   -  Config value 'copyright' = 'Copyright &copy; 2019 - 2023 Arista Networks'
DEBUG   -  Config value 'google_analytics' = None
DEBUG   -  Config value 'dev_addr' = _IpAddressValue(host='127.0.0.1', port=8000)
DEBUG   -  Config value 'use_directory_urls' = True
DEBUG   -  Config value 'repo_url' = 'https://github.com/arista-netdevops-community/anta'
DEBUG   -  Config value 'repo_name' = 'ANTA on Github'
DEBUG   -  Config value 'edit_uri_template' = None
DEBUG   -  Config value 'edit_uri' = 'edit/master/docs/'
DEBUG   -  Config value 'extra_css' = ['stylesheets/extra.material.css']
DEBUG   -  Config value 'extra_javascript' = ['https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.2.1/tablesort.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js']
DEBUG   -  Config value 'extra_templates' = []
DEBUG   -  Config value 'markdown_extensions' = ['toc', 'tables', 'fenced_code', 'attr_list', 'pymdownx.emoji', 'smarty', 'pymdownx.arithmatex', 'pymdownx.betterem', 'pymdownx.caret', 'pymdownx.critic', 'pymdownx.details', 'pymdownx.inlinehilite', 'pymdownx.magiclink',
           'pymdownx.mark', 'pymdownx.smartsymbols', 'pymdownx.superfences', 'pymdownx.tasklist', 'pymdownx.tilde', 'admonition', 'codehilite', 'pymdownx.highlight', 'pymdownx.snippets', 'pymdownx.tabbed']
DEBUG   -  Config value 'mdx_configs' = {'pymdownx.emoji': {'emoji_index': <function twemoji at 0x7f92dbea2ca0>, 'emoji_generator': <function to_svg at 0x7f92dbea3100>}, 'pymdownx.betterem': {'smart_enable': 'all'}, 'pymdownx.tasklist': {'custom_checkbox': True},
           'codehilite': {'guess_lang': True}, 'toc': {'separator': '-', 'permalink': True, 'baselevel': 3}, 'pymdownx.snippets': {'base_path': 'docs/snippets'}, 'pymdownx.tabbed': {'alternate_style': True}}
DEBUG   -  Config value 'strict' = False
DEBUG   -  Config value 'remote_branch' = 'gh-pages'
DEBUG   -  Config value 'remote_name' = 'origin'
DEBUG   -  Config value 'extra' = {'social': [{'icon': 'fontawesome/brands/github', 'link': 'https://github.com/arista-netdevops-community/anta'}, {'icon': 'fontawesome/brands/docker', 'link': 'https://github.com/arista-netdevops-community/anta/pkgs/container/anta'}, {'icon':
           'fontawesome/brands/python', 'link': 'https://pypi.org/project/anta/'}], 'version': {'provider': 'mike', 'default': ['stable']}}
DEBUG   -  Config value 'plugins' = {'mkdocstrings': <mkdocstrings.plugin.MkdocstringsPlugin object at 0x7f92db5cd010>, 'material/search': <material.plugins.search.plugin.SearchPlugin object at 0x7f92db5ce0c0>, 'git-revision-date-localized':
           <mkdocs_git_revision_date_localized_plugin.plugin.GitRevisionDateLocalizedPlugin object at 0x7f92db5cd6d0>, 'mike': <mike.mkdocs_plugin.MikePlugin object at 0x7f92db3f1bb0>}
DEBUG   -  Config value 'hooks' = {}
DEBUG   -  Config value 'watch' = ['/home/carl/git_projects/anta/docs', '/home/carl/git_projects/anta/anta']
DEBUG   -  Config value 'validation' = {'nav': {'omitted_files': 20, 'not_found': 30, 'absolute_links': 20}, 'links': {'not_found': 30, 'absolute_links': 20, 'unrecognized_links': 20}}
DEBUG   -  Running 1 `startup` events
DEBUG   -  Running 4 `config` events
DEBUG   -  mkdocstrings: Adding extension to the list
DEBUG   -  mkdocstrings: Added a subdued autorefs instance <mkdocs_autorefs.plugin.AutorefsPlugin object at 0x7f92dcc786e0>
DEBUG   -  mkdocstrings: Downloading inventory from 'https://docs.python.org/3/objects.inv'
DEBUG   -  mkdocstrings: Downloading inventory from 'https://mkdocstrings.github.io/objects.inv'
DEBUG   -  mkdocstrings: Using cached '/home/carl/.cache/mkdocs/mkdocstrings_url_cache/bcd4e47a3b12afba4c2b4fd7a75cb023.inv' for 'https://docs.python.org/3/objects.inv'
DEBUG   -  mkdocstrings: Downloading inventory from 'https://mkdocstrings.github.io/griffe/objects.inv'
DEBUG   -  mkdocstrings: Using cached '/home/carl/.cache/mkdocs/mkdocstrings_url_cache/90bff636fbf6dae5e9dd75bea10b01b0.inv' for 'https://mkdocstrings.github.io/objects.inv'
DEBUG   -  Looking for translations for locale 'en'
DEBUG   -  mkdocstrings: Using cached '/home/carl/.cache/mkdocs/mkdocstrings_url_cache/ada46327a97ddb2d45f8c08f0eb25bd7.inv' for 'https://mkdocstrings.github.io/griffe/objects.inv'
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/templates/locales'
DEBUG   -  mkdocstrings: Loaded inventory from 'https://mkdocstrings.github.io/objects.inv': 197 items
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/material/templates/locales'
DEBUG   -  No translations found here: '/home/carl/git_projects/anta/docs/overrides/locales'
DEBUG   -  mkdocstrings: Loaded inventory from 'https://mkdocstrings.github.io/griffe/objects.inv': 2046 items
DEBUG   -  Looking for translations for locale 'en'
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/templates/locales'
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/material/templates/locales'
DEBUG   -  No translations found here: '/home/carl/git_projects/anta/docs/overrides/locales'
DEBUG   -  mkdocstrings: Loaded inventory from 'https://docs.python.org/3/objects.inv': 9837 items
DEBUG   -  mkdocs_autorefs: Adding AutorefsExtension to the list
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /home/carl/git_projects/anta/site
DEBUG   -  Looking for translations for locale 'en'
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/templates/locales'
DEBUG   -  No translations found here: '/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/material/templates/locales'
DEBUG   -  No translations found here: '/home/carl/git_projects/anta/docs/overrides/locales'
DEBUG   -  Running 1 `files` events
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
             - imgs/animated-svg.md
WARNING -  A relative path to 'api/report_manager_models.md' is included in the 'nav' configuration, which is not found in the documentation files.
DEBUG   -  Reading markdown pages.
DEBUG   -  Reading: README.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: contribution.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: faq.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: getting-started.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: requirements-and-installation.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: usage-inventory-catalog.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Doc file 'usage-inventory-catalog.md' contains a relative link '../api/inventory.md#anta.inventory.AntaInventory', but the target '../api/inventory.md' is not found among documentation files. Did you mean 'api/inventory.md#anta.inventory.AntaInventory'?
WARNING -  Doc file 'usage-inventory-catalog.md' contains a relative link '../api/catalog.md#anta.catalog.AntaCatalog', but the target '../api/catalog.md' is not found among documentation files. Did you mean 'api/catalog.md#anta.catalog.AntaCatalog'?
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: advanced_usages/as-python-lib.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: advanced_usages/caching.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  Running 1 `page_content` events
DEBUG   -  Reading: advanced_usages/custom-tests.md
DEBUG   -  Running 2 `page_markdown` events
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
DEBUG   -  mkdocstrings: Matched '::: anta.models.AntaTest'
DEBUG   -  mkdocstrings: Using handler 'python'
DEBUG   -  mkdocstrings: Collecting data
ERROR   -  Error reading page 'advanced_usages/custom-tests.md': tuple index out of range
Traceback (most recent call last):
  File "/home/carl/.pyenv/versions/.test/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/__main__.py", line 286, in build_command
    build.build(cfg, dirty=not clean)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/build.py", line 322, in build
    _populate_page(file.page, config, files, dirty)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/commands/build.py", line 175, in _populate_page
    page.render(config, files)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocs/structure/pages.py", line 271, in render
    self.content = md.convert(self.markdown)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/core.py", line 357, in convert
    root = self.parser.parseDocument(self.lines).getroot()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 117, in parseDocument
    self.parseChunk(self.root, '\n'.join(lines))
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 136, in parseChunk
    self.parseBlocks(parent, text.split('\n\n'))
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/markdown/blockparser.py", line 158, in parseBlocks
    if processor.run(parent, blocks) is not False:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings/extension.py", line 124, in run
    html, handler, data = self._process_block(identifier, block, heading_level)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings/extension.py", line 206, in _process_block
    data: CollectorItem = handler.collect(identifier, options)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/mkdocstrings_handlers/python/handler.py", line 283, in collect
    loader.load(module_name)
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/loader.py", line 182, in load
    obj_path, package = self.finder.find_spec(
                        ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/finder.py", line 183, in find_spec
    top_module_name = self._top_module_name(module_path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carl/.pyenv/versions/3.12.1/envs/.test/lib/python3.12/site-packages/griffe/finder.py", line 400, in _top_module_name
    top_path = search_path / rel_path.parts[0]
                             ~~~~~~~~~~~~~~^^^
IndexError: tuple index out of range

Expected behavior

We expect the documentation to be built correctly :)

Environment information

/git_projects/anta fix/mkdocs *1 ❯ griffe --debug-info  # | xclip -selection clipboard                                                                                                                                                 Py .test 3.12.1 carl@ubuntu-dev 11:39:53 AM
- __System__: Linux-6.5.0-14-generic-x86_64-with-glibc2.38
- __Python__: cpython 3.12.1
- __Environment variables__:
- __Installed packages__:
  - `griffe` v0.41.2

Additional context

The issue has been identified and tested on 3.10.4 and 3.12.1.

We also tested with griffe v0.41.1 and it works fine.

Thank you for your support and the amazing project!

@pawamoy
Copy link
Member

pawamoy commented Mar 4, 2024

Hi @carl-baillargeon, thanks for the report. Try removing paths: [anta] in mkdocs.yml: this option must list search paths, not package paths. Since your anta package is in the same folder as mkdocs.yml (root of the repository), you don't need to define paths at all (its default value is [.]).

When you set paths: [anta], and we compute a relative path to the package, the relative path ends up being empty, and therefore rel_path.parts is empty, so accessing [0] on it triggers an index error. I'll catch this exception in the code 🙂

@pawamoy pawamoy closed this as completed Mar 4, 2024
pawamoy added a commit that referenced this issue Mar 4, 2024
@pawamoy
Copy link
Member

pawamoy commented Mar 4, 2024

Version 0.41.3 should also make it work again 🙂
But do fix your paths config 😄

clrpackages pushed a commit to clearlinux-pkgs/pypi-griffe that referenced this issue Mar 5, 2024
…ion 0.41.3

commit 9efda886dcf925a7ba91630705bc304a4cfb31b9
Author: Timothée Mazzucotelli <dev@pawamoy.fr>
Date:   Mon Mar 4 19:10:00 2024 +0100

    chore: Prepare release 0.41.3

commit 46c56c7ff505531f5422f526ad38095ed463cc1b
Author: Timothée Mazzucotelli <dev@pawamoy.fr>
Date:   Mon Mar 4 19:09:49 2024 +0100

    refactor: Catch index errors when finding top module in case of search path misconfiguration

    Issue-#246: mkdocstrings/griffe#246
@carl-baillargeon
Copy link
Author

@pawamoy Everything's good! Thank you again for the support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants