我正在尝试为我的 android 应用程序设置城市飞艇,但我无法获得 Google C2DM 令牌。也许,根据 Urban Airship Doc,我在使用 C2DM 之前正在这样做。
- 在命令行上运行“clientauth.py”(位于分发 zip 文件中的“tools”目录中)
当我在 Mac OS X Lion 的终端上运行该文件时,出现此错误。有人可以帮我解决这个问题吗?先感谢您!
MacBook-Pro:~ me$ python /Users/me/Documents/ua-android-lib-latest/tools/clientauth.py
C2DM Google Account: my google email for c2dm
Password for my google email for c2dm:
Traceback (most recent call last):
File "/Users/me/Documents/ua-android-lib-latest/tools/clientauth.py", line 46, in <module>
ClientLoginTokenFactory().getToken()
File "/Users/me/Documents/ua-android-lib-latest/tools/clientauth.py", line 34, in getToken
response = urllib2.urlopen(request)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 513, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 438, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 521, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden