这个问题本质上是我之前的问题的后续问题,您可以在此处找到。在处理了我遇到的编码错误之后,我遇到了一个新的 HttpError 401 问题。我的开发应用服务器日志的跟踪如下:
ERROR 2012-12-20 03:10:46,312 pipeline.py:2237] Generator main.CloudStorageToBigQuery(*([u'/gs/jibdancsvtest/Datastore Mapper main.streamdata-1582389642294FE5DBBCE-output'],), **{})#2d3dba4f4a5211e2bf0ac3cee1488e47 raised exception. HttpError: <HttpError 401 when requesting https://www.googleapis.com/bigquery/v2/projects/1093XXXXXXXXX/jobs?alt=json returned "Invalid Credentials">
Traceback (most recent call last):
File "C:\Users\Tank\Documents\Aptana Studio 3 Workspace\jibdantest-bq\mapreduce\lib\pipeline\pipeline.py", line 2030, in evaluate
self, pipeline_key, root_pipeline_key, caller_output)
File "C:\Users\Tank\Documents\Aptana Studio 3 Workspace\jibdantest-bq\mapreduce\lib\pipeline\pipeline.py", line 1064, in _run_internal
return self.run(*self.args, **self.kwargs)
File "C:\Users\Tank\Documents\Aptana Studio 3 Workspace\jibdantest-bq\main.py", line 77, in run
result.execute()
File "C:\Users\Tank\Documents\Aptana Studio 3 Workspace\jibdantest-bq\oauth2client\util.py", line 120, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\Tank\Documents\Aptana Studio 3 Workspace\jibdantest-bq\apiclient\http.py", line 678, in execute
raise HttpError(resp, content, uri=self.uri)
HttpError: <HttpError 401 when requesting https://www.googleapis.com/bigquery/v2/projects/1093XXXXXXXXX/jobs?alt=json returned "Invalid Credentials">
我还以为我会从 url 发布 json 响应。这是那个json:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
如果您在 stackoverflow 上点击我上一个问题的链接,您会在我的 main.py 文件中找到运行所有内容的代码。但是如果我需要在这里重新发布它,我可以这样做。
所以,我认为这是一个 OAuth 问题,但我相信我已经正确设置了所有这些。对于我可以做/调查的其他事情的任何建议都会很棒。
提前谢谢了。