XMLSchemaImportWarning: Import of namespace 'http://www.w3.org/2001/04/xmlenc#'



我试图在现有的django项目中集成SAML2 Auth。然而,我一直得到这个错误连续。

F:finessevenvlibsite-packagessaml2xmlschema__init__.py:18: XMLSchemaImportWarning: Import of namespace 'http://www.w3.org/2000/09/xmldsig#' from ['http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'] failed: block access to remote resource http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd.
return _XMLSchema(source, **kwargs)
F:finessevenvlibsite-packagessaml2xmlschema__init__.py:18: XMLSchemaImportWarning: Import of namespace 'http://www.w3.org/2001/04/xmlenc#' from ['http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd'] failed: block access to remote resource http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd.
return _XMLSchema(source, **kwargs)
F:finessevenvlibsite-packagesxmlschemavalidatorsschema.py:1191: XMLSchemaImportWarning: Import of namespace 'http://www.w3.org/2000/09/xmldsig#' from ['http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'] failed: block access to remote resource http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd.
build=build,
F:finessevenvlibsite-packagesxmlschemavalidatorsschema.py:1191: XMLSchemaImportWarning: Import of namespace 'http://www.w3.org/2001/04/xmlenc#' from ['http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd'] failed: block access to remote resource http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd.
build=build,

这个错误的可能原因是什么,我如何解决这个问题?

首先,尝试使用最新版本的django- sam12 -auth。出于必要,我试图维持原来的项目。

第二,您是否安装了xmlsec1二进制文件?如果没有,请查看Igor Zlatkovic在项目网站上构建和发布的Windows二进制文件。

如果以上都没有解决问题,你可能在你的Django应用或你的身份提供者应用上有配置问题。

相关内容

最新更新