Time calculator error

I keep getting an error saying new_day = value + number_of_days_forward, TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘int’, for line 84 of my code.
I’m not really sure what this means, the code works fine in my editor but for some reason repl doesn’t like this assignment, i’ve tried putting int() around everything. Thank you!

Repl link

it should say which test is failing for that error, try to take that test and look at it in your editor

one of those variables in that case has value of None

1 Like

It means “day” has no datatype. And it has no type because it looks like you never give it a Day-name as value, hence the “.get(day)” doesn’t find an entry in the dict and then ofcourse if it doesn’t find anything, value is nothing aka “None”.

Just print(day) before the line which is mentioned in the error and you will see what it is.

Thank you, I really appreciate the help. Turns out my equation of ( if day != -1) isnt a thing so it wasn’t recognising day. Then I had several other problems but all passed now :blush: thanks again