我在 CKAN 上工作,我使用了一个扩展来通过 Azure Active Directory 对我的 CKAN 进行身份验证,我得到了
TypeError: cannot unpack non-iterable NoneType object
我联系了扩展开发人员,但我没有得到开发人员的任何回应。
这是我的 GitHub 问题:https://github.com/ongov/ckanext-msal/issues/4#issuecomment-1445794423
我正在使用这个扩展:https://github.com/ongov/ckanext-msal.git 这是我的日志:
Traceback (most recent call last):
File "/srv/app/src_extensions/ckanext-msal/ckanext/msal/plugin.py", line 98, in get_a_token
user_id = model.User.get(user_name).id
AttributeError: 'NoneType' object has no attribute 'id'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "/srv/app/src_extensions/ckanext-msal/ckanext/msal/plugin.py", line 123, in get_a_token
toolkit.abort(403, 'Not authorized.')
File "/srv/app/src/ckan/ckan/lib/base.py", line 60, in abort
(status_code, detail, headers, comment) = result
TypeError: cannot unpack non-iterable NoneType object