Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

append() argument must be xml.etree.ElementTree.Element, not lxml.etree._Element #50

Open
T-K-233 opened this issue Oct 2, 2023 · 0 comments

Comments

@T-K-233
Copy link

T-K-233 commented Oct 2, 2023

Get the following error when trying to insert a Python dictionary to element tree.

  ...
    xml_data = xmljson.gdata.etree(robot.json, root=xml.etree.ElementTree.Element("root"))
  File "D:\Documents\Python310\lib\site-packages\xmljson\__init__.py", line 135, in etree
    result.append(elem)
TypeError: append() argument must be xml.etree.ElementTree.Element, not lxml.etree._Element

robot.json is formatted with GData format. The data in this particular case is

robot.json = {'link': {'name': 'part_2', '$t': {}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant