程序在Pycharm内部运行良好,但从命令提示符运行时出现了cli.exe错误

时间:2019-07-18 11:34:55

标签: python cmd command-line-interface

我为名为cli.exe的python模块创建了一个可执行文件abcabc在pycharm内部运行良好,但是当我从cmd提示符运行cli.exe时,出现以下错误:

Failed to load logging configuration
Exception occurred inside main() method
Traceback (most recent call last):
  File "ProjectionFiles\projectionStartup.py", line 15, in main
    logobj = ApcLogging(args[3])
  File "ProjectionFiles\logging.py", line 58, in __init__
    raise e
  File "ProjectionFiles\logging.py", line 16, in __init__
    fileConfig(logfile)
  File "logging\config.py", line 71, in fileConfig
  File "logging\config.py", line 104, in _create_formatters
  File "configparser.py", line 958, in __getitem__
KeyError: 'formatters'

我要解决该问题,因为在pycharm中相同的代码可以完美地运行。

我在cmd提示符下运行cli.exe的方式是:cli.exe parameter1 parameter2 parameter3

我也从模块所在的目录运行我的可执行文件(错误全部说明,因为我认为它进入程序然后抛出错误)

我们将竭诚感谢您的帮助。

0 个答案:

没有答案