Frappe-Manager icon indicating copy to clipboard operation
Frappe-Manager copied to clipboard

🐞 Bug Report: click>=8.1.9 breaks fm create due to TypeError

Open yoc-san opened this issue 7 months ago • 0 comments

Describe the bug When running fm create or similar commands on environments with click>=8.1.9, the CLI throws a TypeError involving TyperArgument.make_metavar(). This error prevents site creation and likely affects other commands as well.

Error message

TypeError: TyperArgument.make_metavar() takes 1 positional argument but 2 were given

Steps to reproduce 1. Use Python 3.13+ (although this may affect earlier versions as well) 2. Install frappe-manager in a clean environment via pipx or venv

pipx install frappe-manager

3.	Ensure click>=8.1.9 + is installed
4.	Run:

fm create mysite

Expected behavior The command should create a new site without errors. Instead, the CLI fails at runtime due to an internal incompatibility with the click version.

Environment • frappe-manager: 0.16.0 • Python: 3.13.2 • click: 8.1.9+ (❌ causes error) • typer: 0.9.0 (✅ works fine)

Workaround

Downgrading click to 8.1.8 resolves the issue:

pipx inject frappe-manager click==8.1.8 --force

✅ With this version, all commands run as expected.

Suggested fix • Pin click==8.1.8 in the package dependencies (pyproject.toml or requirements.txt) • Optionally raise a warning if click>=8.1.9 is detected at runtime

Additional context • The issue is reproducible across systems and isolated to click, not typer

yoc-san avatar May 15 '25 23:05 yoc-san