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

add_loopback_full.py lxml.etree.XMLSyntaxError #2

Open
foehn2002 opened this issue Nov 30, 2020 · 1 comment
Open

add_loopback_full.py lxml.etree.XMLSyntaxError #2

foehn2002 opened this issue Nov 30, 2020 · 1 comment

Comments

@foehn2002
Copy link

When execute add_loopback_full.py

Traceback (most recent call last):
File "./add_loopback_full.py", line 99, in
sys.exit(main())
File "./add_loopback_full.py", line 93, in main
netconf_response = m.edit_config(target='running', config=new_ip)
File "/usr/local/lib/python3.6/dist-packages/ncclient/manager.py", line 231, in execute
huge_tree=self.huge_tree).request(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/ncclient/operations/edit.py", line 65, in request
node.append(validated_element(config, ("config", qualify("config"))))
File "/usr/local/lib/python3.6/dist-packages/ncclient/xml
.py", line 145, in validated_element
ele = to_ele(x)
File "/usr/local/lib/python3.6/dist-packages/ncclient/xml_.py", line 124, in to_ele
return x if etree.iselement(x) else etree.fromstring(x.encode('UTF-8'), parser=_get_parser(huge_tree))
File "src/lxml/etree.pyx", line 3237, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1784, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1141, in lxml.etree._BaseParser._parseDoc
File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
File "", line 7
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: adminSt line 7 and up, line 7, column 33

Code:
up
should be
up

@foehn2002
Copy link
Author

<adminSt>up</up>
should be
<adminSt>up</adminSt>

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