Why am I getting the above error message when I run this program? I'm running this program with an mp3 file as an argument, the mp3 file is in the same directory as the python program. There are 30 space reserved for the Title at positoin 125 from the end of an mp3 file, what the title doesn't take up is padded with '\x00', I'm trying to get the title and avoid the 0('\x00') values.
#!/usr/bin/env python3
import sys
file = sys.argv[1]
f = open(file, 'rb')
f.seek(-125, 2)
char = f.read(30)
newchar = ''
counter = 0
while char[counter] is not 0:
newchar = newchar + char[counter]
counter = counter + 1
print(newchar)
f.close()