Reputation: 750
I am following this tutorial for user authentication on GAE, endpoints v2 in Python. I use their code EXACTLY (only pasting in my app ID). Running the code locally via PyCharm, it doesn't like the type of "issuers" wanting a dict: TypeError: issuers type doesn't match .
Has it something to do with IDE integration not being supported yet? What am I overlooking?
In full:
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'>.
Upvotes: 1
Views: 54
Reputation: 2595
Apologies for the incorrect documentation. You do need to pass a dict. So try issuers={'firebase': firebase_issuer}
instead.
Upvotes: 2