TypeError: dict expected at most 1 argument, got 11
ByVictorrr opened this issue · comments
Traceback:
Traceback (most recent call last):
File "C:\Users\delaplai\git\py\iosp\commands\gui.py", line 26, in
Click2Gui(run_function=hello)
File "C:\Users\delaplai\AppData\Local\Programs\Python\Python39\lib\site-packages\cli2gui\decorators.py", line 141, in Click2Gui
bSpec = BuildSpec(
"""Tests a simple parser
Program from https://click.palletsprojects.com/en/7.x/#documentation
"""
from future import annotations
import sys
from pathlib import Path
import click
THISDIR = str(Path(file).resolve().parent)
sys.path.insert(0, str(Path(THISDIR).parent.parent))
from cli2gui import Click2Gui
@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for _index in range(count):
click.echo("Hello %s!" % name)
Click2Gui(run_function=hello)
⬇️ This is how you call the function without a GUI
hello()
Can you include the full traceback please?
Not sure how I missed that you did... Anyway should be fixed now :)