[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Strange error message with QTreeWidget
From: Marc Nations <mnations.lists () gmail ! com>
Date: 2009-01-26 17:37:27
Message-ID: f4010570901260937g687cb31ar5582256d53e43e9f () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
I am getting the following error message and just can not figure out what is
happening to cause it:
Unexpected error: (<type 'exceptions.IndexError'>, IndexError('list index
out of range',), <traceback object at 0x019BE490>)
I have narrowed it down to at least one action...QTreeWidget.clear() and
only after I have used the tree to drag/drop widgets into another tree. If I
perform a clear() action on a freshly populated tree then I don't get the
error. However after the drag/drop is performed then somehow the indexes get
screwed up.
I also tried to clear out the tree by popping all the TreeWidgetItems out
using takeTopLevelItem<http://doc.trolltech.com/4.3/qtreewidget.html#takeTopLevelItem>().
I grabbed the TopLevelItem count and went through a loop grabbing them all.
I got the same error on the last loop. However I'm positive I didn't go
through the loop an extra time. If I had 2 top level items I made sure it
only looped twice.
It's causing a problem once I package the application for deployment because
once the app is closed it always throws up the message that an error has
occurred, check the logs. So I tried to figure out a way to catch the
exception, but I couldn't catch that one using Python try/except. I also
couldn't find a way to turn it off. Anybody have an idea what's going on
here?
Thanks,
Marc
[Attachment #5 (text/html)]
Hi,<div><br></div><div>I am getting the following error message and just can not figure out \
what is happening to cause it:</div><div><br></div><blockquote class="webkit-indent-blockquote" \
style="margin: 0 0 0 40px; border: none; padding: 0px;"> Unexpected error: (<type \
'exceptions.IndexError'>, IndexError('list index out of range',), \
<traceback object at 0x019BE490>)<br></blockquote><div><br></div><div>I have narrowed it \
down to at least one action...QTreeWidget.clear() and only <span class="Apple-style-span" \
style="font-style: italic;">after </span>I have used the tree to drag/drop widgets into another \
tree. If I perform a clear() action on a freshly populated tree then I don't get the error. \
However after the drag/drop is performed then somehow the indexes get screwed up. </div> \
<div><br></div><div>I also tried to clear out the tree by popping all the TreeWidgetItems \
ou<span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;">t \
using </span><a href="http://doc.trolltech.com/4.3/qtreewidget.html#takeTopLevelItem" \
style="text-decoration: none; "><span class="Apple-style-span" style="color: rgb(0, 0, \
0);"><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;"><span \
class="Apple-style-span" style="font-size: \
small;">takeTopLevelItem</span></span></span></a><span class="Apple-style-span" \
style="font-family: arial, helvetica, sans-serif;"><span class="Apple-style-span" \
style="font-size: small;">(). I grabbed the TopLevelItem count and went through a loop grabbing \
them all. I got the same error on the last loop. However I'm positive I didn't go \
through the loop an extra time. If I had 2 top level items I made sure it only looped \
twice. </span></span></div> <div><br></div><div>It's causing a problem once I package \
the application for deployment because once the app is closed it always throws up the message \
that an error has occurred, check the logs. So I tried to figure out a way to catch the \
exception, but I couldn't catch that one using Python try/except. I also couldn't find \
a way to turn it off. Anybody have an idea what's going on here?</div> \
<div><br></div><div>Thanks,</div><div>Marc</div>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic