03-28-2022 12:44 PM - edited 03-28-2022 01:46 PM
SOLVED via Google.
Hello,
I am using python and suds-jerko to update the line label on phones. My issue is figuring out the formatting of the line info in updatePhone. using this code:
resp = client.service.updatePhone(name = 'SEPAC44F214C7EB', description = "MJW Test",
lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'},
label : "83774356"})
I get this error:
NameError Traceback (most recent call last) /var/folders/7c/lghfcp0n1x5_kzxyj55__5g00000gn/T/ipykernel_41974/1536426317.py in <module> 1 resp = client.service.updatePhone(name = 'SEPAC44F214C7EB', description = "MJW Test", ----> 2 lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'}, 3 label : "83774356"}) NameError: name 'lineIdentifier' is not defined
Any input on how to format this correctly?
THanks,
Mike
Solved! Go to Solution.
03-29-2022 06:41 AM
Check your curly braces. The "label" is incorrectly folded into the "lines":
lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'}, label : "83774356"}
Should be
lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'} } <-need another bracket here,
label : "83774356"}
03-29-2022 06:41 AM
Check your curly braces. The "label" is incorrectly folded into the "lines":
lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'}, label : "83774356"}
Should be
lines = { lineIdentifier : {pattern : '83774356', routePartitionName : 'AMR-L1-PT'} } <-need another bracket here,
label : "83774356"}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide