Error in callback function when I concatenate a string

Traceback (most recent call last):
File “C:\Users\adela\PycharmProjects\Dashboard1\”, line 89, in callback_a
eFile = value + ex
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘str’

Above I’m creating one string (eFile) from two others (value and ex). How to stop it from doing this?

HI there,

this error is not related specifically to the callback. I assume your variable “value” is None based on the error you get.

Without your code it’s impossible to tell.

@AIMPED is right.

So unless at a point due to the data, value can be none, then you can add an if statement to check when it is none to do something else or skip.

E.g. if value == None: eFile = ex

If value cannot be None, then you may consider why it is so