zhaoterryy / mkdocs-pdf-export-plugin

An MkDocs plugin to export content pages as PDF files
MIT License
318 stars 42 forks source link

mkdocs build fails with "full_load() takes 1 positional argument but 2 were given" error #49

Closed DawMatt closed 5 years ago

DawMatt commented 5 years ago

Now that I've installed the plugin and enabled it in the mkdocs.yml file, mkdocs build no longer works.

The error being returned is: TypeError: full_load() takes 1 positional argument but 2 were given

I'm running Python 3.7 on a Windows 10 system (x64, but 32 bit Python). Any suggestions on how I can work around this?

Thanks, Matt

mkdocs build

Traceback (most recent call last):
  File "c:\program files (x86)\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files (x86)\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\program files (x86)\python37-32\scripts\mkdocs.exe\__main__.py", line 9, in <module>
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\mkdocs\__main__.py", line 162, in build_command
    site_dir=site_dir
  File "c:\program files (x86)\python37-32\lib\site-packages\mkdocs\config\base.py", line 193, in load_config
    cfg.load_file(config_file)
  File "c:\program files (x86)\python37-32\lib\site-packages\mkdocs\config\base.py", line 134, in load_file
    return self.load_dict(utils.yaml_load(config_file))
  File "c:\program files (x86)\python37-32\lib\site-packages\mkdocs\utils\__init__.py", line 78, in yaml_load
    return yaml.full_load(source, Loader)
TypeError: full_load() takes 1 positional argument but 2 were given
DawMatt commented 5 years ago

Sorry. Turned out to be an issue unrelated to the plugin.

Studentenfutter commented 2 years ago

@DawMatt Could you please share your solution? I am getting the same error.

Studentenfutter commented 2 years ago

For me it seems like GTK3 caused the error, I needed to restart the Shell I used on Windows after I installed GTK3 to reload PATH.