mkdocs-multirepo-plugin icon indicating copy to clipboard operation
mkdocs-multirepo-plugin copied to clipboard

AttributeError: 'str' object has no attribute 'items' (Not related to `navigation.indexes`)

Open the-real-cphillips opened this issue 3 years ago • 2 comments
trafficstars

I know this error has come up before and it was determined to be related to navigation.indexes but this is different.

Here's my mkdocs.yml where I'm using multirepo

nav:
  - Home: index.md
  - Tool: '!import https://github.com/{user}/{repo}'

Here is the nav from mkdocs.yaml inside the Tool repo:

nav:
  - Welcome: index.md
  - ...
  - Advanced Features:
    - feature 1: feat1.md

When using !import the error is experienced. If I use the repos section under plugins, there is no problem importing.

Traceback:

  File "~/env/lib/python3.9/site-packages/mkdocs_multirepo_plugin/plugin.py", line 155, in on_config
    return self.handle_nav_based_import(config)
  File "~/env/lib/python3.9/site-packages/mkdocs_multirepo_plugin/plugin.py", line 109, in handle_nav_based_import
    repo_config = repo.load_config()
  File "~/env/lib/python3.9/site-packages/mkdocs_multirepo_plugin/structure.py", line 295, in load_config
    resolve_nav_paths(config.get('nav'), self.name)
  File "~/env/lib/python3.9/site-packages/mkdocs_multirepo_plugin/structure.py", line 27, in resolve_nav_paths
    (key, value), = entry.items()
AttributeError: 'str' object has no attribute 'items'

the-real-cphillips avatar Jul 21 '22 12:07 the-real-cphillips

@BullCheat Can you also update the test cases for fibonacci to include negative inputs? and the expected output should be -1.

dayfine avatar Jul 29 '18 20:07 dayfine