What does the error "Sum.__float__ returned non-float (type NotImplementedType)" mean?

Hi!

I am encountering the error TypeError: Sum.__float__ returned non-float (type NotImplementedType) with an expression that I implemented in my code.

Can anyone tell me what this error means?

Hi, you must provide a MWE for us to tell you what is wrong