Textualize/trogon

using trogon on Windows with py3.8.10 crashes

deven-gqc opened this issue · 0 comments

I have a very simple CLI for which I am using trogon. Upon running command tui, I get the following error. The same code works as expected on WSL.

Version:
python: 3.8.10
click: 8.1.3
trogon: 0.4.0

(fastai) C:\git\public\nested-cli-tui-demo>hello tui   
Traceback (most recent call last):
  File "C:\Users\deven\Envs\fastai\Scripts\hello-script.py", line 33, in <module>
    sys.exit(load_entry_point('foo', 'console_scripts', 'hello')())
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\deven\Envs\fastai\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\deven\Envs\fastai\lib\site-packages\trogon\trogon.py", line 292, in wrapped_tui
    Trogon(app, app_name=name, click_context=ctx).run()
  File "C:\Users\deven\Envs\fastai\lib\site-packages\trogon\trogon.py", line 228, in __init__
    self.app_name = detect_run_string()
  File "C:\Users\deven\Envs\fastai\lib\site-packages\trogon\detect_run_string.py", line 39, in detect_run_string
    argv = get_orig_argv()
  File "C:\Users\deven\Envs\fastai\lib\site-packages\trogon\detect_run_string.py", line 17, in get_orig_argv
    ctypes.pythonapi.Py_GetArgcArgv(ctypes.byref(_argc), ctypes.byref(_argv))
  File "c:\python38\lib\ctypes\__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "c:\python38\lib\ctypes\__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'Py_GetArgcArgv' not found