Closed nagylzs closed 7 years ago
Below is a minimal working example. I have tested this with Python 3.4, Python 3.6 32 bit and Python 3.6 64 bit.
import io from lxml import etree test_node = etree.fromstring(''' <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512"> <soap:Body> <ns1:RequestSecurityToken/> </soap:Body> </soap:Envelope>''') output = io.BytesIO(b'<?xml version="1.0" encoding="UTF-8"?>') test_node.getroottree().write(output, encoding="UTF-8", xml_declaration=None, default_namespace=None, method="c14n", short_empty_elements=False ) output.seek(0) print(output.read())
Result:
Traceback (most recent call last): File "C:/not_telling/c14n.py", line 16, in <module> short_empty_elements=False File "lxml.etree.pyx", line 1869, in lxml.etree._ElementTree.write (src\lxml\lxml.etree.c:57004) TypeError: write() got an unexpected keyword argument 'short_empty_elements'
I have just upgraded lxml version to 4.0.0. (But the same is the issue with 3.7.)
There was a similar issue on github ( https://github.com/seveas/python-hpilo/issues/49 ) but I think that is a different problem.
Any clue, what should I do?
I don't see any pytho-hpilo code in your example, could you explain why there is a python-hpilo bug here?
Wow, I have posted this issue to the wrong project, sorry. :-(
No problem! Good luck with the issue.
Below is a minimal working example. I have tested this with Python 3.4, Python 3.6 32 bit and Python 3.6 64 bit.
Result:
I have just upgraded lxml version to 4.0.0. (But the same is the issue with 3.7.)
There was a similar issue on github ( https://github.com/seveas/python-hpilo/issues/49 ) but I think that is a different problem.
Any clue, what should I do?