GAE Endpoints firebase: Authentication Users TypeError: issuers type doesn't match <type 'dict'>
GAE Endpoints firebase: Authentication Users TypeError: issuers type doesn't match <type 'dict'>
我正在关注 this GAE 用户身份验证教程,Python 中的端点 v2。
我完全使用他们的代码(只粘贴在我的应用程序 ID 中)。
运行 通过 PyCharm 本地代码,它不喜欢 "issuers" 想要字典的类型:TypeError: issuers type doesn't match .
是否与 IDE 集成尚不支持有关?我忽略了什么?
完整:
ERROR 2017-06-05 15:23:19,417 wsgi.py:263]
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "C:\Users(...)\web app\goal.py", line 103, in <module>
issuers=[firebase_issuer])
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 976, in api
api_key_required=api_key_required, base_path=base_path)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 469, in __init__
base_path=base_path)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 550, in __init__
_CheckType(issuers, dict, 'issuers')
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 195, in _CheckType
raise TypeError('%s type doesn\'t match %s.' % (name, check_type))
TypeError: issuers type doesn't match <type 'dict'>.
对于不正确的文档,我们深表歉意。您确实需要通过命令。所以请尝试 issuers={'firebase': firebase_issuer}
。
我正在关注 this GAE 用户身份验证教程,Python 中的端点 v2。 我完全使用他们的代码(只粘贴在我的应用程序 ID 中)。 运行 通过 PyCharm 本地代码,它不喜欢 "issuers" 想要字典的类型:TypeError: issuers type doesn't match .
是否与 IDE 集成尚不支持有关?我忽略了什么?
完整:
ERROR 2017-06-05 15:23:19,417 wsgi.py:263]
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "C:\Users(...)\web app\goal.py", line 103, in <module>
issuers=[firebase_issuer])
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 976, in api
api_key_required=api_key_required, base_path=base_path)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 469, in __init__
base_path=base_path)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\lib\protorpc-1.0\protorpc\util.py", line 173, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 550, in __init__
_CheckType(issuers, dict, 'issuers')
File "C:\Users\(...)\web app\lib\endpoints\api_config.py", line 195, in _CheckType
raise TypeError('%s type doesn\'t match %s.' % (name, check_type))
TypeError: issuers type doesn't match <type 'dict'>.
对于不正确的文档,我们深表歉意。您确实需要通过命令。所以请尝试 issuers={'firebase': firebase_issuer}
。