IndexError: list index out of range

lina's picture

Forums: 

http://mgl.scripps.edu/forum/viewtopic.php?f=11&t=584

... (line 601) ...
# Find out how many clipping planes
maxClipP = int(GL.glGetDoublev(GL.GL_MAX_CLIP_PLANES)[0])
if(maxClipP > 6):
maxClipP = 6 # the driver can't provide more than 6 clipping planes

I tried the above advice before, it shows:

Run AutoDockTools from /usr/lib/python2.6/dist-packages/AutoDockTools
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/AutoDockTools/__init__.py",
line 371, in runADT
from Pmv.moleculeViewer import MoleculeViewer
File "/usr/lib/python2.6/dist-packages/Pmv/moleculeViewer.py", line
20, in
from DejaVu.Geom import Geom
File "/usr/lib/python2.6/dist-packages/DejaVu/__init__.py", line
181, in
from Viewer import Viewer
File "/usr/lib/python2.6/dist-packages/DejaVu/Viewer.py", line 101,
in
class Viewer(Tkinter.Widget, Tkinter.Misc, EventHandler):
File "/usr/lib/python2.6/dist-packages/DejaVu/Viewer.py", line 602, in Viewer
if(maxClipP > 6):
NameError: name 'maxClipP' is not defined
hit enter to continue

I don't know how to fix it.

On Fri, May 27, 2011 at 9:16 PM, Camaleón wrote:
> On Fri, 27 May 2011 16:28:37 +0800, lina wrote:
>
>> when I tried AutoDockTools, which showed me something like
>>
>> IndexError: list index out of range
>>
>> Is it something relevant to driver or Pmv or ?
>
> (...)
>
> Take a look into this thread:
>
> PMV or ADT stopped working on vista and debian
> http://mgl.scripps.edu/forum/viewtopic.php?f=11&t=584
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/pan.2011.05.27.13.16.04@gmail.com
>
>

IndexError: list index out of range

Camaleón's picture

On Fri, 27 May 2011 22:27:57 +0800, lina wrote:

(please, avoid top-posting, it makes replying very annoying Smile )

> On Fri, May 27, 2011 at 10:12 PM, Camaleón wrote:

(...)

>> Hum... it is also reported in Debian BTS:
>>
>> runPmv crashes on start with index out of range for self.clipPlaneNames
>> [num] in .../DejaVu/Clip.py
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603022

> so it's a ATI driver issue.

So it seems.

Which is bad, because closed source drivers are not of the like of
developers/packages so you'll have to wait for a fix or try with the most
updated upstream driver ;-(

In the meantime, you can use the workaround.

> I tried on the desktop with Nivida driver (wheezy AMD64) it shows no
> problem but I gotta wait for 10 mins or more to start this program. it
> showed me lists of warnings at the end:
>
> P.S The long warning list:

(...)

You can also test the solution mentioned in the bug, it's a bit different
from the one provided in the forum thread, so this could work.

Greetings,

IndexError: list index out of range

lina's picture

On Fri, May 27, 2011 at 10:57 PM, Camaleón wrote:
> On Fri, 27 May 2011 22:27:57 +0800, lina wrote:
>
> (please, avoid top-posting, it makes replying very annoying Smile )

Thanks for your replying. I will try.
>
>> On Fri, May 27, 2011 at 10:12 PM, Camaleón wrote:
>
> (...)
>
>>> Hum... it is also reported in Debian BTS:
>>>
>>> runPmv crashes on start with index out of range for self.clipPlaneNames
>>> [num] in .../DejaVu/Clip.py
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603022
>
>> so it's a ATI driver issue.
>
> So it seems.
>
> Which is bad, because closed source drivers are not of the like of
> developers/packages so you'll have to wait for a fix or try with the most
> updated upstream driver ;-(
>
> In the meantime, you can use the workaround.
>
>> I tried on the desktop with Nivida driver (wheezy AMD64) it shows no
>> problem but I gotta wait for 10 mins or more to start this program. it
>> showed me lists of warnings at the end:
>>
>> P.S The long warning list:
>
> (...)
>
> You can also test the solution mentioned in the bug, it's a bit different
> from the one provided in the forum thread, so this could work.

actually remember the first URL you provided mention

# Find out how many clipping planes
601: maxClipP = int(GL.glGetDoublev(GL.GL_MAX_CLIP_PLANES)[0])

I added
if(maxClipP > 6):
maxClipP = 6 # the driver can't provide more than 6 clipping planes

after line 601, it showed me
NameError: name 'maxClipP' is not defined

but the line 601 has already had the maxClipP, then why added new
ones do not work here?

sorry, I am not good at python either.

>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/pan.2011.05.27.14.57.35@gmail.com
>
>

IndexError: list index out of range

Camaleón's picture

On Fri, 27 May 2011 23:22:45 +0800, lina wrote:

> On Fri, May 27, 2011 at 10:57 PM, Camaleón wrote:

>> You can also test the solution mentioned in the bug, it's a bit
>> different from the one provided in the forum thread, so this could
>> work.
>
> actually remember the first URL you provided mention

(...)

Yep, but the bug seems to indicate a different change, look what it says:

***
The amount of planes is set/determined in
/usr/lib/python2.6/dist-packages/DejaVu/Viewer.py,
where maxClipP = int(GL.glGetDoublev(GL.GL_MAX_CLIP_PLANES)[0]).

changing this line to:
maxClipP = 5
will make runPmv start.
***

So according to that, you should have to change this line:

# original line
maxClipP = int(GL.glGetDoublev(GL.GL_MAX_CLIP_PLANES)[0])

To this one:

# modified one, bug 603022
maxClipP = 5

Or at least that's my understanding, but as I don't have the file to
check it by myself, YMMV Smile

Greetings,