TypeError: isoformat() takes no arguments (1 given)

I was getting the following error because of that line:
TypeError: isoformat() takes no arguments (1 given)