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

Document Building Errors, extendMarkdown() missing 1 required positional argument #9490

Closed
Rui-Zu opened this issue Aug 10, 2022 · 1 comment

Comments

@Rui-Zu
Copy link

Rui-Zu commented Aug 10, 2022

Details

Expected Result

I want to compile and generate the documentation for my GitHub page. It works 2 months ago but start to show errors when I try to regenerate the documentation.

The error seems to come from extendMarkdown() function from core.py. I tried to remove all the markdown extensions but the error remains.

Actual Result

ERROR   -  Error reading page 'index.md': extendMarkdown() missing 1 required positional argument: 'md_globals' 
Traceback (most recent call last):
  File "/home/docs/.asdf/installs/python/3.9.13/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/docs/.asdf/installs/python/3.9.13/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/mkdocs/__main__.py", line 202, in <module>
    cli()
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/mkdocs/__main__.py", line 157, in build_command
    build.build(config.load_config(
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/mkdocs/commands/build.py", line 274, in build
    _populate_page(file.page, config, files, dirty)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/mkdocs/commands/build.py", line 177, in _populate_page
    page.render(config, files)
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/mkdocs/structure/pages.py", line 180, in render
    md = markdown.Markdown(
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/markdown/core.py", line 96, in __init__
    self.registerExtensions(extensions=kwargs.get('extensions', []),
  File "/home/docs/checkouts/readthedocs.org/user_builds/shaarp/envs/latest/lib/python3.9/site-packages/markdown/core.py", line 125, in registerExtensions
    ext.extendMarkdown(self)
TypeError: extendMarkdown() missing 1 required positional argument: 'md_globals'
@Rui-Zu Rui-Zu changed the title Document Building Errors Document Building Errors, extendMarkdown() missing 1 required positional argument Aug 10, 2022
@Rui-Zu Rui-Zu closed this as completed Aug 10, 2022
@Rui-Zu
Copy link
Author

Rui-Zu commented Aug 10, 2022

The problem can be solved following the thread below,
#9461

It turns out that the global parameter issue arises due to the Markdown version. It's important to pin the Markdown version to avoid breakdown.

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

1 participant