-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid JSON payload received. Unexpected token. error when bulk uploading with update_cells(cell_list) #680
Comments
Hey, 1 - is 2 - I think this is your issue: 3 - Manually(through gspread) append the values, do they work? |
Hi, |
@eanunez thanks for the solution. Closing the issue. |
The solution posted above will convert any float-type columns into object-type, which causes problems for downstream numerical use in Sheets (all the numbers will be interpreted as strings). It seems like there needs to be a way for worksheet.update() to automatically leave NaN cells blank, or something. |
I found an alternate solution that preserves the numeric data type of numeric columns:
Probably quite slow if your sheet is large but it works 🤷♂️ |
For what it's worth, I got this same error due to having infinite values in my dataframe. Replacing those with 'NaN' values and then filling those 'NaN' values with empty strings, as suggested above, did the trick:
|
IDK why, but it works!! lol |
the fix is quite easy, we just need to setup the This is a very brittle solution to be honest. |
Worked fine for me too! |
This just leaves a big whitespace in the cell above the valule. Any other fixes?? |
Hello,
I started getting the error when I updated to Python 3.7 two days ago. I use the following code to upload a pandas df to a gsheet - the error happens with any df.
Re the error: this seems to pertain to some cells with value '180901_millbrae_1', may or may not be relevant. This exact same data and code used to work fine.
Any ideas?
Error:
Code:
Operating System: macOS Sierra 10.12.6
Python version: 3.7.0
gspread version: 3.1.0
The text was updated successfully, but these errors were encountered: