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
Possibly a misunderstanding on my behalf, but anyway:
I tried the nogroup_demo.py verbatim, running it from a higher directory:
❯ cd /Users/alexhunsley/Documents/dev/
❯ mkdir test_dir
❯ cat > test_dir/nogroup_demo.py <then I pasted in the nogroup_demo src>
❯ python test_dir/nogroup_demo.py tui
<I did config in TUI interace, then hit CTRL-R>
Running python nogroup_demo.py add --category work -v --labels important sada
python: can't open file '/Users/alexhunsley/Documents/dev/test_dir/nogroup_demo.py':
[Errno 2] No such file or directory
So it's missing out the test_dir/ bit before the nogroup_demo.py.
Trogon: 0.4.0
M1 MacBook Pro (16-inch, 2021)
Mac OS: 13.3.1 (a)
Python: 3.10.1
Click: 8.1.3
Thanks for making Trogon btw!
The text was updated successfully, but these errors were encountered:
alexhunsley
changed the title
After TUI interaction, trogon attempts to launch the final command in working dir, not the script dir
Unpackaged scripts: after TUI interaction, trogon attempts to launch the final command in working dir, not the script dir
Jun 8, 2023
I think I'm hitting the same issue with this demo script.
importclickfromtrogonimporttui@tui()@click.command()@click.option("--count", default=1, help="Number of greetings.")@click.option("--name", prompt="Your name",help="The person to greet.")defhello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""forxinrange(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/[email protected]/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/[email protected]/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/[email protected]/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!
The text was updated successfully, but these errors were encountered: