С python 2.7
Раньше я разбивал строку на '-', вот так:
for item in artist_track:
artist = item[0].encode('utf-8')
track = item[1].encode('utf-8')
# avoid track names with - Live tail after track name
track_head, sep, tail = track.partition(' - ')
Теперь, с python 3.7
, я получаю следующую ошибку:
track_head, sep, tail = track.partition(' - ')
TypeError: a bytes-like object is required, not 'str'
Как мне это исправить?