Google Fusion Table身份验证:HTTP错误400

时间:2013-01-16 18:34:56

标签: python python-2.7 google-fusion-tables

我尝试了这个python example code并收到以下错误:

追踪(最近一次呼叫最后一次):

  File "C:\Users\rey\Documents\ProjectFolder\GoogleCharts\fusion.py", line 187, in <module>
    api_test.main()

  File "C:\Users\rey\Documents\ProjectFolder\GoogleCharts\fusion.py", line 55, in main
    serv_resp = urllib2.urlopen(serv_req)

  File "C:\Python27\lib\urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)

  File "C:\Python27\lib\urllib2.py", line 406, in open
    response = meth(req, response)

  File "C:\Python27\lib\urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)

  File "C:\Python27\lib\urllib2.py", line 444, in error
    return self._call_chain(*args)

  File "C:\Python27\lib\urllib2.py", line 378, in _call_chain
    result = func(*args)

  File "C:\Python27\lib\urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

HTTPError: HTTP Error 400: Bad Request

我按照脚本中注释掉的部分中的说明设置了我的身份验证,并认为我已正确完成设置。

要创建客户端ID,我有以下设置:

Application type: Installed application

Installed application type: Other

当我运行脚本时,程序会提示我输入URL参数。我该怎么办呢?我在哪里可以找到更多的例子? O链接的示例是迄今为止我发现的唯一最新的python示例。

谢谢!

1 个答案:

答案 0 :(得分:0)

好的,当提示输入URL参数时,字面意思是在“code =”之后使用URL的参数。这有点令人失望,因为我正在寻找一种方法来自动验证并从具有所有信息的本地文件创建融合表。有什么建议吗?