Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit c7db406

Browse files
committed
Resolves error: datetime.datetime(...) is not JSON serializable
1 parent 266d080 commit c7db406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/google_spreadsheet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def login_open_sheet(oauth_key_file, spreadsheet):
115115

116116
# Append the data in the spreadsheet, including a timestamp
117117
try:
118-
worksheet.append_row((datetime.datetime.now(), temp, humidity))
118+
worksheet.append_row((datetime.datetime.now().isoformat(), temp, humidity))
119119
except:
120120
# Error appending data, most likely because credentials are stale.
121121
# Null out the worksheet so a login is performed at the top of the loop.

0 commit comments

Comments
 (0)