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

mkdocs build failing #653

Closed
planetf1 opened this issue Jan 3, 2023 · 7 comments
Closed

mkdocs build failing #653

planetf1 opened this issue Jan 3, 2023 · 7 comments
Assignees

Comments

@planetf1
Copy link
Member

planetf1 commented Jan 3, 2023

As reported via https://lfaifoundation.slack.com/archives/C02M2222F63/p1672667645179079

mkdocs build is failing

ERROR    -  Error building page 'release-notes/1-0.md': can only join an iterable
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/mkdocs/__main__.py", line 250, in build_command
    build.build(cfg, dirty=not clean)
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/mkdocs/commands/build.py", line 329, in build
    _build_page(file.page, config, doc_files, nav, env, dirty)
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/mkdocs/commands/build.py", line 226, in _build_page
    context = config.plugins.run_event(
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/mkdocs/plugins.py", line 520, in run_event
    result = method(item, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/material/plugins/search/plugin.py", line 90, in on_page_context
    self.search_index.add_entry_from_context(page)
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/material/plugins/search/plugin.py", line 149, in add_entry_from_context
    self.create_entry_for_section(section, page.toc, page.url, page)
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/material/plugins/search/plugin.py", line 167, in create_entry_for_section
    title = "".join(section.title).strip()
            ^^^^^^^^^^^^^^^^^^^^^^
TypeError: can only join an iterable
Error: Process completed with exit code 1.
@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

This has affected only builds since yesterday, and can be replicated locally using mkdocs 1.4.2

The last mkdocs release (on their github repo) was to 1.4.2 on 1 Nov https://github.com/mkdocs/mkdocs
the latest image for our github runner (ubuntu-latest) was 12 Dec - https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md -
python 3.11 was 24 Oct https://www.python.org/downloads/

planetf1 added a commit to planetf1/egeria-docs that referenced this issue Jan 3, 2023
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue Jan 3, 2023
@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

The error occurs from the mkdocs-material search plugin

        title = "".join(section.title).strip()

@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

The cause appears to be related to files containing numerics, ie
docs/release-notes/1-0.md
where these are also in the mkdocs.yml navigation index.

Probably some kind of type conversion issue.

@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

See squidfunk/mkdocs-material#4817

@mandy-chessell
Copy link
Contributor

Thank you @planetf1 for your analysis 👍

I have been thinking that we should consolidate the list in the nav into a consolidated file for the older releases. This is a trigger to do so. I will do that today so we have our builds working again

@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

The builds are working now. I submitted a pr. another one to follow to reinstate v9 with a workaround from the devs.

Of course that's aside from any changes we want to make

planetf1 added a commit to planetf1/egeria-docs that referenced this issue Jan 3, 2023
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria-docs that referenced this issue Jan 3, 2023
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1
Copy link
Member Author

planetf1 commented Jan 3, 2023

As per workaround in the mkdocs-material bug report, versions are now quoted, so all should be working at the latest level regardless of any decisions we wish to make to improve our docs.

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