Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 将表加载到bigquery时,每次都会引发google.auth.exceptions.RefreshError_Google Cloud Platform_Google Bigquery - Fatal编程技术网

Google cloud platform 将表加载到bigquery时,每次都会引发google.auth.exceptions.RefreshError

Google cloud platform 将表加载到bigquery时,每次都会引发google.auth.exceptions.RefreshError,google-cloud-platform,google-bigquery,Google Cloud Platform,Google Bigquery,我正在将一个json行文件加载到bigquery。但是,由于以下错误,它失败了: File "/home/togayyazar/.local/lib/python3.7/site-packages/google/auth/compute_engine/credentials.py", line 102, in refresh six.raise_from(new_exc, caught_exc) File "<string>", line 3, in raise_fr

我正在将一个json行文件加载到bigquery。但是,由于以下错误,它失败了:

  File "/home/togayyazar/.local/lib/python3.7/site-packages/google/auth/compute_engine/credentials.py", line 102, in refresh
    six.raise_from(new_exc, caught_exc)
  File "<string>", line 3, in raise_from
google.auth.exceptions.RefreshError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/?recursive=true from the Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n  <meta charset=utf-8>\\n  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n  <title>Error 404 (Not Found)!!1</title>\\n  <style>\\n    *{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}\\n  </style>\\n  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\\n  <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n  <p>The requested URL <code>/computeMetadata/v1/instance/service-accounts/default/?recursive=true</code> was not found on this server.  <ins>That\\xe2\\x80\\x99s all we know.</ins

我用一个新的凭据json文件更改了凭据json文件,但它不起作用。

看起来您的文件名/路径可能有输入错误

是一个NotFound错误,表示找不到任何内容


根据html中的错误判断,它无法在执行命令的位置找到“/computeMetadata/v1/instance/service accounts/default/?recursive=true”,而不是没有权限的凭据。

您的凭据有问题。它可能与您正在使用的身份验证方法(服务帐户、用户凭据)以及您如何使用它(来自BigQuery客户端库、命令行工具)有关

在我看来,您使用的是来自google计算引擎VM的bq命令行工具(google cloud sdk的一部分)。默认情况下,您可以访问实例中的服务帐户,如果您希望使用其他方法进行身份验证,请参阅说明