【问题标题】:An "Expecting property name:" error started coming - OAuth 2.0 Google APIs Client Library for Python“期望的属性名称:”错误开始出现 - OAuth 2.0 Google APIs Client Library for Python
【发布时间】:2014-08-12 12:59:13
【问题描述】:

我从google code samples. 中获取了这个示例,它之前可以工作,但突然停止工作。我尝试重置所有内容。还是不走运。

我做错了什么?

这是错误日志。

Kshitij:oauth Kshitij$ python playlistitems.py
Traceback (most recent call last):
  File "playlistitems.py", line 51, in <module>
    scope=YOUTUBE_READONLY_SCOPE)
  File "/Users/Kshitij/django project/trailers_backend/oauth/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/Users/Kshitij/django project/trailers_backend/oauth/oauth2client/client.py", line 1343, in flow_from_clientsecrets
    client_type, client_info = clientsecrets.loadfile(filename, cache=cache)
  File "/Users/Kshitij/django project/trailers_backend/oauth/oauth2client/clientsecrets.py", line 145, in loadfile
    return _loadfile(filename)
  File "/Users/Kshitij/django project/trailers_backend/oauth/oauth2client/clientsecrets.py", line 103, in _loadfile
    obj = simplejson.load(fp)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 381, in raw_decode
    obj, end = self.scan_once(s, idx)
  ValueError: Expecting property name: line 16 column 3 (char 561)

【问题讨论】:

    标签: python google-api-python-client


    【解决方案1】:

    我发现了问题。我在client_secrets.json 中添加了额外的参数,这就是flow_from_clientsecrets() 无法解析它的原因。我删除它们后它开始工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-01
      • 2018-07-14
      • 1970-01-01
      相关资源
      最近更新 更多