Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using trogon on Windows with py3.8.10 crashes #44

Open
deven-gqc opened this issue Jun 13, 2023 · 0 comments
Open

using trogon on Windows with py3.8.10 crashes #44

deven-gqc opened this issue Jun 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@deven-gqc
Copy link

deven-gqc commented Jun 13, 2023

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
@darrenburns darrenburns added the bug Something isn't working label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants