rosscdh / mkdocs-markdownextradata-plugin

A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
MIT License
83 stars 18 forks source link

AttributeError: module 'mkdocs.utils' has no attribute 'string_types' when using with mkdocs >= 1.1 #40

Closed pavinduLakshan closed 2 years ago

pavinduLakshan commented 2 years ago

We are using mkdocs-markdownextradata-plugin in one of our documentation sites along with mkdocs. The requirements.txt of our site is as follows.

mkdocs>=1.1
mkdocs-material>=4.2.0
markdown-include>=0.5.1
pymdown-extensions>=5.0.0
mkdocs-redirects==1.0.0
mkdocs-markdownextradata-plugin==0.1.1
markdown-include==0.5.1

When running mkdocs serve with Python3 to run the site locally, we are faced with the following error.

File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/markdownextradata/plugin.py", line 20, in <module>
    class MarkdownExtraDataPlugin(BasePlugin):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/markdownextradata/plugin.py", line 26, in MarkdownExtraDataPlugin
    ('data', mkdocs.config.config_options.Type(mkdocs.utils.string_types, default=None)),
AttributeError: module 'mkdocs.utils' has no attribute 'string_types'