Comment 2 for bug 614004

Revision history for this message
Lorenzo Gil Sanchez (lgs) wrote :

You introduced a small subtle bug at http://bazaar.launchpad.net/~roland-hedberg/pysaml2/main/revision/429 when creating the logout request:

            request = samlp.LogoutRequest(
                id=sid(),
                version=VERSION,
                issue_instant=instant(),
                destination=destination,
                issuer=self.issuer(),
                session_index=sid(),
                name_id = name_id,
            )

This gives me the following exception when serializing this object into a string:

Exception Type: AttributeError
Exception Value: 'str' object has no attribute 'become_child_element_of'
Exception Location: /home/lgs/proyectos/yaco/pysaml2/src/saml2/__init__.py in _add_members_to_element_tree, line 500

I saw that the 'session_index' attribute is not neccesary and removing it from the request is what works for me:

            request = samlp.LogoutRequest(
                id=sid(),
                version=VERSION,
                issue_instant=instant(),
                destination=destination,
                issuer=self.issuer(),
                name_id = name_id,
            )

See my change at: http://bazaar.launchpad.net/~lgs/pysaml2/main/revision/271