You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the just released 2.4.0 version, the github action fails with the below error. When using version 2.3.0 the error does not occur.
INFO - git-committers: fetching contributors for docs/index.md
ERROR - Error building page 'index.md': cannot access local variable 'user' where it is not associated with a value
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.6/x64/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs/__main__.py", line 311, in gh_deploy_command
build.build(cfg, dirty=not clean)
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs/commands/build.py", line 337, in build
_build_page(
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs/commands/build.py", line 213, in _build_page
context = config.plugins.on_page_context(context, page=page, config=config, nav=nav)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs/plugins.py", line 643, in on_page_context
return self.run_event('page_context', context, page=page, config=config, nav=nav)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs/plugins.py", line 566, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs_git_committers_plugin_2/plugin.py", line 287, in on_page_context
authors, last_commit_date = self.list_contributors(git_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs_git_committers_plugin_2/plugin.py", line 267, in list_contributors
authors = self.get_contributors_to_file(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/mkdocs_git_committers_plugin_2/plugin.py", line 121, in get_contributors_to_file
'avatar': commit['author']['avatar_url'] if user['avatar_url'] is not None else ''
^^^^
UnboundLocalError: cannot access local variable 'user' where it is not associated with a value
Error: Process completed with exit code 1.
The text was updated successfully, but these errors were encountered:
Hello,
Thank you for your plugin ❤️
When using the just released 2.4.0 version, the github action fails with the below error. When using version 2.3.0 the error does not occur.
The text was updated successfully, but these errors were encountered: