wilhelmer / mkdocs-multirepo

A bit like monorepo, but keeps MkDocs projects separate.
MIT License
40 stars 2 forks source link

mkdocs-multirepo --build returns TypeError: object of type 'NoneType' has no len() #2

Closed emollusion closed 2 years ago

emollusion commented 2 years ago

Hi!

When running build; mkdocs-multirepo --build

I get the following in return:

Building projects ...
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: /home/za/OneDrive/Dokument/git/mkdocs-multirepo-2/site/os-docs
WARNING  -  Template skipped: 'search.html' not found in theme directories.
INFO     -  Documentation built in 0.56 seconds
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: /home/za/OneDrive/Dokument/git/mkdocs-multirepo-2/site/mkdocs-test
INFO     -  Documentation built in 0.39 seconds
Copying extra files ...
Generating landing page ...
Traceback (most recent call last):
  File "/home/za/.local/bin/mkdocs-multirepo", line 8, in <module>
    sys.exit(cli())
  File "/home/za/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/za/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/za/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/za/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/za/.local/lib/python3.10/site-packages/mkdocs_multirepo/__init__.py", line 82, in cli
    soup = loadTemplate(config["index_tpl"])
  File "/home/za/.local/lib/python3.10/site-packages/mkdocs_multirepo/__init__.py", line 145, in loadTemplate
    soup = BeautifulSoup(contents, 'html.parser')
  File "/home/za/.local/lib/python3.10/site-packages/bs4/__init__.py", line 312, in __init__
    elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len()

Any ideas what could be wrong?

Thank you!

wilhelmer commented 2 years ago

Looks like something's wrong with the HTML format of your template file. Does it work with the sample index.tpl file included in this repo? Could you post your index.tpl file here?

emollusion commented 2 years ago

Hi!

I am terribly sorry. I thank you for the quick response. This was a classic RTFM case. I had not populated the index.tpl file.

Greatful thanks!