Trying to change wall materialID

Hello, all

I was trying to change wall ‘MateriId’ using python script in dynamo.
I think that I am almost done for doing that, but I failed. I couldn’t find the reason why I had failed.
I attached my model below, please help me to fix it.


Please don’t make duplicate posts. You didn’t respond to the information on your previous one. This just makes it harder for you to get an answer.

I am sorry to make you confused. But, it isn’t a duplicate post.
The previous question was I uploaded the question without providing any coding, but this question was uploaded to know the cause because an error occurred in the part I was coding.

Thank you,