required help with python code.

Peter Otten __peter__ at web.de
Tue Aug 25 06:01:24 EDT 2015


Srinivas, Jostna wrote:

> I am trying to write a python code to create tableau data extract using
> tableau API.
> 
> In the process I am facing following error.
> 
> Please help me to fix. I tried a lot but couldn't get over net. Its
> critical requirement and we need your help.

Posting a picture turns quoting into typing; this is not a polite way to 
ask. In the future please post text only.

In your screenshot you use the ibm_db.fetch_both() method twice, once as

row = ibm_db.fetch_both(result)
while row:
    print row["FSC_YR"]
    row = ibm_db.fetch_both(result)

which seems to work, and once as

for i in ibm_db.fetch_both(result):
    ...

which doesn't. Assuming everything else is correct replacing the for loop 
with a while loop similar to that in step 1 should help.





More information about the Python-list mailing list