Python Error: "...does not support indexing"

Posted on
Thu Sep 10, 2020 8:30 pm
ckeyes888 offline
Posts: 2280
Joined: Nov 26, 2009
Location: Kalispell, MT

Python Error: "...does not support indexing"

Any idea why I'm getting the error: "embedded script: "VariableCmds" object does not support indexing"?
Code: Select all
theText = indigo.variable[175134881].value
if "Clear" in theText:
    indigo.variable.updateValue(175134881, value="Sunny")
elif "Cloudy" in theText and "Mostly" in theText:
    indigo.variable.updateValue(175134881, value="Cloudy_Mostly")
elif "Cloudy" in theText and "Few" in theText:
    indigo.variable.updateValue(175134881, value="Fair")


Thanks,

Carl

Posted on
Fri Sep 11, 2020 3:23 am
FlyingDiver offline
User avatar
Posts: 5351
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Python Error: "...does not support indexing"

https://wiki.indigodomo.com/doku.php?id ... e_examples

it's "indigo.variables[]"
Code: Select all
theText = indigo.variables[175134881].value
if "Clear" in theText:
    indigo.variable.updateValue(175134881, value="Sunny")
elif "Cloudy" in theText and "Mostly" in theText:
    indigo.variable.updateValue(175134881, value="Cloudy_Mostly")
elif "Cloudy" in theText and "Few" in theText:
    indigo.variable.updateValue(175134881, value="Fair")

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Sep 11, 2020 6:19 am
ckeyes888 offline
Posts: 2280
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Python Error: "...does not support indexing"

Doh! Thanks.

Carl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest