I'm trying to parse through a massive file for an iTunes library and I'm attempting to use plistlib library.
My code looks something like this:
import plistlib
with open('iTunes Music Library.xml') as fp:
pl = plistlib.load(fp)
print(pl["aKey"])
As I do so, I get the error:
TypeError: startswith first arg must be str or a tuple of str, not bytes
I'm not sure what this is, any explanations?
You need to open the file as a binary, i.e.