Select to view content in your preferred language

Python Error

635
0
07-11-2017 06:48 PM
RamakrishnaBillakanti
Regular Contributor

Automating the Publishing through arcpy scripting and modifying the properties of the SDDraft by xml parsing. Able to change most of the properties but when running the script for recycleInterval property I'm getting this error :

if key.firstChild.data == 'recycleInterval': key.nextSibling.firstChild.data = 1
AttributeError: 'NoneType' object has no attribute 'data'

Script : 

for key in keys:
if key.firstChild.data == 'UsageTimeout': key.nextSibling.firstChild.data = 43200
if key.firstChild.data == 'WaitTimeout': key.nextSibling.firstChild.data = 300
if key.firstChild.data == 'IdleTimeout': key.nextSibling.firstChild.data = 1800
if key.firstChild.data == 'MinInstances': key.nextSibling.firstChild.data = 1
if key.firstChild.data == 'MaxInstances': key.nextSibling.firstChild.data = 2
if key.firstChild.data == 'recycleInterval': key.nextSibling.firstChild.data = 1

How can I get this issue resolved. Thank you. 

Tags (2)
0 Kudos
0 Replies