Google电子表格更新单元格,导致服务器错误502使用Google-Drive-Ruby Gem v1.0.5



我使用Google_drive Gem从工作簿中更新Google工作表。我使用以下代码获得工作表对象

ws=session.spreadsheet_by_key(doc_key).worksheet_by_title(spend_sheet_name)

更改工作表中的单元格内容后,我尝试保存工作表:

ws.save

执行ws.save命令

时会遇到此错误
    Response code 502 for post https://spreadsheets.google.com/feeds/cells/xxxxxxxxxxxxxxx/yyyyyyyyy/private/full/batch: <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 502 (Server Error)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>502.</b> <ins>That’s an error.</ins>
  <p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.  <ins>That’s all we know.</ins>

我尝试按照说明进行设置,并设置了一个开始救援块,后者在30秒后重新检索ws.save,但我仍然遇到相同的错误。

更新:当更新小单元格〜3至5时,这起作用了。但是,当我尝试更新>(300行x 13列)时,我会收到上述错误。我正在使用https://github.com/gimite/google-drive-ruby版本1.0.5我还尝试将GEM更新为v2.0.1,但我收到相同的错误

有人可以在这里帮助我。

基于此论坛的

,驱动器/文档服务似乎存在一些问题,这就是为什么您获得服务器错误502 的原因。尝试清除缓存和饼干解决。您可以在握住Shift键的同时刷新浏览器来快速清除缓存。

另外,如果您在尝试访问Google Docs,Sheets或Slide时,您会看到"临时错误(502)"消息或其他服务器错误消息,则意味着您的文档暂时不可用。这些错误通常会在几分钟内解决,所以请等一下,然后再尝试再次访问它们。

最新更新