Empty string shows as nonetype in python

Hi

It appears that a FinalBuilder string variable presents itself as a string type in a python script when it is not empty. When the string variable is empty the python type is nonetype. I don’t know if it was intended to work like this, but to me it was quite confusing and took me a while to find out. I fixed the 'problem' in my case by casting the variable to a string, which at first seems to work.

But since every string can be empty this would mean every string needs to be casted to be sure the script does not crash in case of an empty string.

Or am I missing something here?

kind regards,
Jef

Hi Jef,

I will look into this today and get back to you.

Hi Jef,

I have reproduced the issue here. For the moment I suggest that casting the value as str is the work around. I will be looking into whether there is a more permanent solution for this issue.