The outfile should be in binary mode.
outFile = open('output.xml', 'wb')
More Related Contents:
- Parse SGML with Open Arbitrary Tags in Python 3
- How to install lxml on Windows
- Python for in range()
- __init__() missing 1 required positional argument ‘address’
- Python 3.x rounding behavior
- Are lists thread-safe?
- What are type hints in Python 3.5?
- How can I change a global variable from within a function?
- Referring to the null object in Python
- Size of list in memory
- Return in generator together with yield in Python 3.3
- Python “raise from” usage
- Using win32com with multithreading
- Checking the strength of a password (how to check conditions)
- ImportError: No module named ‘google’
- Python3 correct way to import relative or absolute?
- How to downgrade python from 3.7 to 3.6
- from __future__ import annotations
- Updating OptionMenu from List
- Embed picture in email
- “Permission Denied” trying to run Python on Windows 10
- What is the Python 3 equivalent of “python -m SimpleHTTPServer”
- Using asyncio.Queue for producer-consumer flow
- Are there any reasons not to use an OrderedDict?
- Equivalent to InnerHTML when using lxml.html to parse HTML
- Resize fields in Django Admin
- PyQt4 center window on active screen
- Performing len on list of a zip object clears zip [duplicate]
- What does the slice() function do in Python?
- Can’t use chrome driver for Selenium