Open alexhunsley opened 1 year ago
I think I'm hitting the same issue with this demo script.
import click
from trogon import tui
@tui()
@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 x in range(count):
click.echo(f"Hello {name}!")
if __name__ == "__main__":
hello()
When I run it I get this traceback after hitting ctrl + r.
Traceback (most recent call last):
File "/Users/vincent/Development/prodigy/cli.py", line 17, in <module>
hello()
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/trogon/trogon.py", line 296, in wrapped_tui
Trogon(app, app_name=name, command_name=command, click_context=ctx).run()
File "/Users/vincent/Development/prodigy/venv/lib/python3.9/site-packages/trogon/trogon.py", line 264, in run
os.execvp(program_name, arguments)
File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 574, in execvp
_execvpe(file, args)
File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 616, in _execvpe
raise last_exc
File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 607, in _execvpe
exec_func(fullname, *argrest)
FileNotFoundError: [Errno 2] No such file or directory
Possibly a misunderstanding on my behalf, but anyway:
I tried the
nogroup_demo.py
verbatim, running it from a higher directory:So it's missing out the
test_dir/
bit before thenogroup_demo.py
.Thanks for making Trogon btw!