I have a strange thing going on.
I have 2 custom properties. 1 called Group1 and 1 called Group1Previous.
Basically what I want to do is update the Group1Previous with the previous value of Group1.
There are some reasons why I want to do this, that I am not explaining right now, unless somebody want to know. But I do not think it is relevant.
If I use currentValue.value, the code works as I expected.
If I replace currentValue with previousValue this does not work anymore.
Error running property change script on session.custom.Group1: Traceback (most recent call last): File "function:valueChanged", line 2, in valueChanged AttributeError: 'NoneType' object has no attribute 'value'
What am I doing wrong? Any help would be appreciated.
When your session loads for the first time the property has not yet had a value, so previousValue is None. Your script will work in future executions, it will just error out the first time. You just need to add a 'previousValue is not None' check to your if statement.
Thank you Amy. That makes sense, but I still am having issues.
I created at the session 2 custom properties.
Group1 and Group1Previous.
so if Group1 changes it should write the previous state to Group1Previous.
But it does noy like that I use the ".Value" even though it lets me select it?