1

我有一个使用prompt_toolkit库的 python 3 应用程序。如果我通过cmdPowerShell启动应用程序,则应用程序启动时不会出现问题。但是,当我通过Windows git bash启动应用程序时,出现以下错误:-

Traceback (most recent call last):
  File "application.py", line 313, in <module>
    ret_code = main(str(args.com))
  File "application.py", line 170, in main
    s_opt = session.prompt(f"{s_time} >")
  AttributeError: 'NoneType' object has no attribute 'prompt'

为什么这在 git bash 而不是在 cmd/PowerShell 上失败了,有没有办法克服这个问题,以便我可以从 git bash 运行我的应用程序?

我正在使用 Python v3.8.3、prompt-toolkit v3.0.5 和 git bash v2.26.2.windows.1,在 Windows 10 上运行。

4

0 回答 0