I have a table of grid cells with a field for the number of plant taxa recorded in each grid cell. I want to calculate a new field showing the percentage of all plant taxa across all grid cells that have been recorded in each grid cell.
The plant taxa recorded field is of type Long and looks like this:

I am adapting the answers to a thread asking this same question here:
https://community.esri.com/t5/python-questions/field-calculator-sum-of-field/m-p/141870/highlight/true#M11036
For some reason this text box won't let me copy and paste indentation. I am pasting snapshots of my codeblock in two parts:


The expression is:

The expression says its valid. I have taken this from copying and pasting an accepted solution in the above thread and just put my own path in there. The field I am creating is of type Double. When I try to calculate, I get the following error message:
ERROR 000539: Traceback (most recent call last):
File "<expression>", line 1, in <module>
File "<string>", line 11, in update
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
Can anyone please help me understand what is going wrong?