1
There’s a tab character before timestamp
. You should either use spaces or tabs to indent Python, never both. Your editor may show the indentation looking correct but it may not match how Python understands a tab.
PEP-8 says use only spaces.
Source:stackexchange.com