第一次运行时出现Pychecker索引错误

时间:2016-07-07 08:03:09

标签: python python-2.6 pychecker

我刚刚使用“python setup.py install”在Windows 7 Pro上安装了pychecker。当我使用命令在我的脚本上运行它时:

c:\Python26\Scripts\pychecker -#100 finaltest17.py

我收到以下错误/追溯:

C:\Users\....\ToBeReleased>C:\Python26\python.exe C:\Python26\Lib\site-packages\pychecker\checker.py -#100 finaltest17.py
Processing module finaltest17 (finaltest17.py)...
  Caught exception importing module finaltest17:
    File "C:\Python26\Lib\site-packages\pychecker\pcmodules.py", line 533, in setupMainCode()
      self.moduleName, self.moduleDir)
    File "C:\Python26\Lib\site-packages\pychecker\pychecker\utils.py", line 184, in findModule()
      handle, filename, smt = _q_find_module(p, path)
    File "C:\Python26\Lib\site-packages\pychecker\pychecker\utils.py", line 162, in _q_find_module()
      if not cfg().quixote:
    File "C:\Python26\Lib\site-packages\pychecker\pychecker\utils.py", line 39, in cfg()
      return _cfg[-1]
  IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\pychecker\checker.py", line 364, in <module>
    sys.exit(main(sys.argv))
  File "C:\Python26\Lib\site-packages\pychecker\checker.py", line 337, in main
    importWarnings = processFiles(files, _cfg, _print_processing)
  File "C:\Python26\Lib\site-packages\pychecker\checker.py", line 270, in processFiles
    loaded = pcmodule.load()
  File "C:\Python26\Lib\site-packages\pychecker\pcmodules.py", line 477, in load

    return utils.cfg().ignoreImportErrors
  File "C:\Python26\Lib\site-packages\pychecker\pychecker\utils.py", line 39, in cfg
    return _cfg[-1]
IndexError: list index out of range

如果有人能指出我正确的方向,那就太好了。

由于

斯图尔特

1 个答案:

答案 0 :(得分:0)

问题已解决。 我在SourceForge上找到了以下支持请求,它指的是需要在pychecker.bat中使用短格式(8.3)路径和文件名,而不是在较新版本的Windows中允许的长格式。 https://sourceforge.net/p/pychecker/support-requests/7/#96cb