Closed hao24real closed 3 years ago
Nice catch! I'll have a look at that now.
So the two errors... When SheetsIO requests data from the Google Sheets API it needs the spreadsheet ID, worksheet name and the apiKey; you can also optionally provide it a cell reference "range" (e.g. A4:D4) and only return data from those cells, but SheetsIO just asks for the whole sheet.
Previously, we were taking the worksheet name from config and directly putting it into the URL for the request to Google... but spaces are not automatically handled - we have to do some encoding ourselves to replace " " with "%20", otherwise Google returns a html page giving a vague explanation that a bad request happened. So there's two parts to this - one is that SheetsIO needs to "nicely" handle when json is not returned so that the error is more informative, and we need to properly encode the worksheet name when making a request.
I am currently putting together a new minor version release (v0.7.2) - will add tests for the fix here and release that shortly.
Released in v0.7.2
Describe the bug If the name of the tab include dash or space, SheetsIO will throw an error after clicking "update now"
To Reproduce Steps to reproduce the behavior:
Expected behavior Should run smoothly regardless of space of dash
Screenshots if containing space, it throws json error which is not correct, because space is acceptable in json
if containing dash it says unable to parse range
Desktop (please complete the following information):