hi, I am new to Python at beginner level and following Mr Mosh tutorials.
while I am following Mr Mosh coding a simple project that involves automation that process thousands of spreadsheets in under a second, and do act in accordance with him step by step. Although the codes mine and his are the same but when I run the code I am getting something like:
corrected_price = cell.value * 0.9
TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘float’
The error indicates that you try to multiply a None type with a float which makes no sense mathematically. perhaps you should check the cell to see if it’s empty.
I assume that the value should be presumed to be 0 if not present, but I do not own the Python course so I am not certain what the behavior should be for an empty cell.