Texera / texera

Collaborative Machine-Learning-Centric Data Analytics Using Workflows
https://texera.github.io
Apache License 2.0
163 stars 72 forks source link

Googlesheet append API returns 400 #1063

Closed Yicong-Huang closed 3 years ago

Yicong-Huang commented 3 years ago

deployed export googlesheet feature on prod server (https://texera.ics.uci.edu) however failed with 400 HTTP code from Googlesheet append API. The target file can be created in drive and the table header is created. No data is appended.

bug trace (Thread-47) com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request [error] POST https://sheets.googleapis.com/v4/spreadsheets/1LId0O9Na2pebh7-s0Ph4h7_nLB3UCfr43ckcyvQ6KXQ/values/A1:append?valueInputOption=RAW [error] { [error] "code" : 400, [error] "errors" : [ { [error] "domain" : "global", [error] "message" : "Invalid values[1][1]: struct_value {\n}\n", [error] "reason" : "badRequest" [error] } ], [error] "message" : "Invalid values[1][1]: struct_value {\n}\n", [error] "status" : "INVALID_ARGUMENT" [error] } [error] com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request [error] POST https://sheets.googleapis.com/v4/spreadsheets/1LId0O9Na2pebh7-s0Ph4h7_nLB3UCfr43ckcyvQ6KXQ/values/A1:append?valueInputOption=RAW [error] { [error] "code" : 400, [error] "errors" : [ { [error] "domain" : "global", [error] "message" : "Invalid values[1][1]: struct_value {\n}\n", [error] "reason" : "badRequest" [error] } ], [error] "message" : "Invalid values[1][1]: struct_value {\n}\n", [error] "status" : "INVALID_ARGUMENT" [error] } [error] at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146) [error] at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:118) [error] at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:37) [error] at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:428) [error] at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1108) [error] at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:514) [error] at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:455) [error] at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:565) [error] at edu.uci.ics.texera.web.resource.ResultDownloadResource$.uploadContent(ResultDownloadResource.scala:205) [error] at edu.uci.ics.texera.web.resource.ResultDownloadResource$.$anonfun$uploadResult$2(ResultDownloadResource.scala:180) [error] at edu.uci.ics.texera.web.resource.ResultDownloadResource$.$anonfun$uploadResult$2$adapted(ResultDownloadResource.scala:170) [error] at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:792) [error] at scala.collection.immutable.List.foreach(List.scala:392) [error] at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:791) [error] at edu.uci.ics.texera.web.resource.ResultDownloadResource$.uploadResult(ResultDownloadResource.scala:170) [error] at edu.uci.ics.texera.web.resource.ResultDownloadResource$.$anonfun$handleGoogleSheetRequest$1(ResultDownloadResource.scala:141) [error] at java.base/java.lang.Thread.run(Thread.java:834)
Yicong-Huang commented 3 years ago

I believe it is due to some types like LONG or TIMESTAMP is not supported correctly.