-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Social Plugin] Concurrency 1 throws error #5515
Copy link
Copy link
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
In the version mkdocs-material-9.1.12-insiders-4.34.0 when using social plugin (with customisations) I am getting below error in netlify
11:01:33 AM: $ mkdocs build
11:01:33 AM: Traceback (most recent call last):
11:01:33 AM: File "/opt/buildhome/python3.8/bin/mkdocs", line 8, in <module>
11:01:33 AM: sys.exit(cli())
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
11:01:33 AM: return self.main(*args, **kwargs)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/click/core.py", line 1055, in main
11:01:33 AM: rv = self.invoke(ctx)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
11:01:33 AM: return _process_result(sub_ctx.command.invoke(sub_ctx))
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
11:01:33 AM: return ctx.invoke(self.callback, **ctx.params)
11:01:34 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/click/core.py", line 760, in invoke
11:01:33 AM: return __callback(*args, **kwargs)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/mkdocs/__main__.py", line 248, in build_command
11:01:33 AM: cfg['plugins'].run_event('startup', command='build', dirty=not clean)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/mkdocs/plugins.py", line 522, in run_event
11:01:33 AM: result = method(**kwargs)
11:01:33 AM: File "/opt/buildhome/python3.8/lib/python3.8/site-packages/material/plugins/social/plugin.py", line 76, in on_startup
11:01:33 AM: self.card_pool = ThreadPoolExecutor(self.config.concurrency - 1)
11:01:33 AM: File "/usr/lib/python3.8/concurrent/futures/thread.py", line 141, in __init__
11:01:33 AM: raise ValueError("max_workers must be greater than 0")
11:01:33 AM: ValueError: max_workers must be greater than 0
Bug description
It was working fine in mkdocs-material-9.1.12-insiders-4.33.2
Related links
Reproduction
I can reproduce this on local by setting concurrency to 1
If I set concurrency to 2, the issues goes away.
I don't have a minimal reproduction ATM, but if that is absolutely necessary I can spend time on it and get back in a day or two.
Steps to reproduce
- social:
cards_layout_dir: social-preview
cards_layout: custom
concurrency: 1mkdocs build
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open