Python warning Outputappend problem

Hi all,

I’ve used this code on another script and modified it slightly and it’s causing all sorts of problems.

Its probably something very minor, but it’s driving me nuts.

please see code below and the warning, any advise would be appreciated.



Firstly, paste your code as you’ll get a better answer
Secondly, you’re missing a dot between “output” and “append” in the final else statement.

1 Like

Here’s the full code:

output = []

for i in IN[0]:
    if i == IN[1]:
    elif i == IN[2]:
    elif i == IN[3]:
        output.append("data not valid")

OUT = output

1 Like

@James_Washbourne or you can do it with DesignScript like this


f = [Imperative]
if ( a == b )
{return = "P";
elseif ( a == c )
{return = "T";
elseif ( a == d )
{return = "C";
{return = "Data Not Valid";

Revisions.dyn (15.0 KB)


This is an interesting method what does the f = [Imperative] line do.

I found a work around by just taking the first character the string out. hahaha, very low tech but it did the trick :joy: