cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
846
Views
0
Helpful
3
Replies

When i am running below code- getting error - TypeError: tuple indices must be integers, not str

I am getting below error when i am running given code:

result = client.service.listPhone({'name':'SEPEXXXXD958F06'},{'name':'','model':''})

print(result)

for node in result['return']['phone']:

    print str(node['name']), str(node['model'])

************

(200, (reply){

   return =

      (return){

         phone[] =

            (LPhone){

               _uuid = "{51D5AC0A-E3F9-C05B-B446-4F1ACD6D0472}"

               name = "SEPEXXXXD958F06"

               model = "Cisco 7945"

            },

      }

})

Traceback (most recent call last):

  File "C:\Python27\Scripts\Listphone1.py", line 58, in <module>

    for node in result['return']['phone']:

TypeError: tuple indices must be integers, not str

Any help will be appreciated.

3 Replies 3

prasanth.ccvp
Level 1
Level 1

Hello

I am also having similar issue. Can you let me know, how you fixed the issue ?

Regards

Prasanth

npetrele
Cisco Employee
Cisco Employee

This is actually a Python/Soap Library issue.  I suggest you find out who supports your SOAP library for Python and get support there.  They'll probably need to see the AXL WSDL to debug it. 

More details would be helpful (which SOAP library?).  If you can provide a small sample application project which demonstrates the problem, we may be able to get it working,

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: