NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
453 stars 102 forks source link

Uncaught exception in action "mkdocs-run" - material theme / pymdownx.betterem / mkdocs-run #270

Closed arthurzenika closed 1 year ago

arthurzenika commented 1 year ago

Environment

Describe the bug

Following the getting started guide I get :

❯ novella
Created temporary build directory /tmp/novella-u5rsn3nx
Copy ['content'] to /tmp/novella-u5rsn3nx
Watch /home/arthur/src/client/org/project/docs/content
Detected Git repository URL: https://github.com/org/project
Detected edit URI: blob/develop/docs/content
Generating new /tmp/novella-u5rsn3nx/mkdocs.yml
Discovered Python modules ['conf'] and packages ['tests', 'cmdb_pic_tooling'] in '/home/arthur/src/client/org/project/docs/..'.
Load Python modules (search_path: ['/home/arthur/src/client/org/project/docs/../src', '/home/arthur/src/client/org/project/docs/..'], modules: ['conf'], packages: ['cmdb_pic_tooling'], discover: True)
Watch /home/arthur/src/client/org/project/README.md
Run $ mkdocs build -d /home/arthur/src/client/org/project/docs/_site
ERROR   -  Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs 
ERROR   -  Config value: 'markdown_extensions'. Error: Failed loading extension "pymdownx.betterem". 

Aborted with 2 Configuration Errors!
Error: Failed loading extension "pymdownx.betterem". defined at /home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/templates/mkdocs.py:102
Traceback (most recent call last):
  File "/home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/build.py", line 152, in _run_actions
    action.execute(self)
  File "/home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/action.py", line 151, in execute
    raise RuntimeError(f'command exited with code {self._proc.returncode}')
RuntimeError: command exited with code 1

Expected behavior

For it to generate some docs ?

NiklasRosenstein commented 1 year ago

Hey @arthurzenika , thank you for reporting this issue. I'll have to check at what step this is missing in the docs; but Novella is using the MkDocs material theme by default so unless you change the theme you will need to install the theme.

$ pip install mkdocs-material
NiklasRosenstein commented 1 year ago

Fixed in c962e39