cannot __getitem__ from DB reply list

  • Thread starter Konstantinos Pachopoulos
  • Start date
K

Konstantinos Pachopoulos

Hi,
i have the following function:
################################
def getGNUPlotInputFeaturesVersion(self):
s=""
bugCommits=0
trdocCommits=0
featCommits=0
ct=CommitType()

for version in self.releaseVersionsList_:
self.execQuery("SELECT
msg,prssedDevsFileNum,prssedMakesFileNum,prssedDocsFileNum,prssedGraphsFileNum
FROM Commit WHERE \

projVersion=\""+version+"\";");
for tuple in self.dbcursor_.fetchall():
print tuple
################################
On the "print tuple" part, i get:

kostas@sqo-oss:~/workspace/SVNLog2DB$ jython 2LaunchQueries.py
Connection established to database...
Traceback (innermost last):
File "2LaunchQueries.py", line 5, in ?
File "/home/kostas/workspace/SVNLog2DB/QueryExecutor.py", line 80, in
getGNUPlotInputFeaturesVersion
AttributeError: __getitem__


As far as i have read, this means, that there is a problem getting
something from the list, because it might be FOR EXAMPLE , that
"self.dbcursor_.fetchall()" doesn't return a list -i know it does.
However, i did a "print self.dbcursor_.fetchall()" and i got a huge list
of tuples...

Why can't i iterate the list? Any advice?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top