医个学生 发表于 2021-9-9 14:26:49

python

请问python代码怎么修复?

Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on win32
Type "copyright", "credits" or "license()" for more information.

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
   
IDLE 1.2.2      ==== No Subprocess ====
>>> Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files (x86)\The Scripps Research Institute\Autodock\4.2.6\lib\lib-tk\Tkinter.py", line 1403, in __call__
    return self.func(*args)
File "C:\Program Files (x86)\The Scripps Research Institute\Autodock\4.2.6\lib\site-packages\AutoDockTools\autogpfCommands.py", line 4479, in chooseMolecule_cb
    mol = self.chooser.getMolSet()
File "C:\Program Files (x86)\The Scripps Research Institute\Autodock\4.2.6\lib\site-packages\Pmv\guiTools.py", line 178, in getMolSet
    if self.mode=='single': return mols
File "C:\Program Files (x86)\The Scripps Research Institute\Autodock\4.2.6\lib\UserList.py", line 28, in __getitem__
    def __getitem__(self, i): return self.data
IndexError: list index out of range

https://xxx.ilovefishc.com/album/202109/08/204723ubxj7h1phmjfjddm.png

wp231957 发表于 2021-9-9 14:39:54

代码在哪里???

傻眼貓咪 发表于 2021-9-9 16:11:05

{:5_99:}{:5_99:}

洛阳城 发表于 2021-9-10 09:30:23

报错的解释是列表索引值溢出,比如一个列表只有4个元素,你索引它的第5个元素就会引发索引值溢出,具体为什么溢出得分析代码~

Twilight6 发表于 2021-9-17 09:03:20


报错内容:列表索引超出范围

更改下索引范围应该可以解决,但是没有贴上代码,具体情况就无法判断

页: [1]
查看完整版本: python