comwes / mkpdfs-mkdocs-plugin

Converts your mkdocs documentation in PDF, to be shared with users
https://comwes.github.io/mkpdfs-mkdocs-plugin
GNU General Public License v3.0
103 stars 36 forks source link

TypeError: on_serve() got an unexpected keyword argument 'builder' #24

Closed ghost closed 3 years ago

ghost commented 4 years ago

After github install:

pip install -e git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs-plugin

mkdocs serve:

Traceback (most recent call last):
  File "/venv/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/venv/lib/python3.8/site-packages/mkdocs/__main__.py", line 133, in serve_command
    serve.serve(
  File "/venv/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 146, in serve
    _livereload(host, port, config, builder, site_dir)
  File "/venv/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 76, in _livereload
    server = config['plugins'].run_event('serve', server, config=config, builder=builder)
  File "/venv/lib/python3.8/site-packages/mkdocs/plugins.py", line 94, in run_event
    result = method(item, **kwargs)
TypeError: on_serve() got an unexpected keyword argument 'builder'
trogper commented 4 years ago

does the error happen:

tgrangeray commented 4 years ago

Hello, After github install, i have the same error (python 3.7, mkdocs 1.1.2) mkdocs build with mkpdfs -> ok mkdocs serve without mkpdfs -> ok

Mkpdfs can be loaded after the server started

jwaschkau commented 4 years ago

The PR should fix this problem

fletort commented 4 years ago

Hello, i fall also in this bug..... Can the Fix be accepted ?

tanaymishra commented 4 years ago

Maybe you have created models and your def with the same name.