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

a bytes-like object is required, not 'str' #130

Open
sriharshamadala opened this issue Aug 6, 2018 · 2 comments
Open

a bytes-like object is required, not 'str' #130

sriharshamadala opened this issue Aug 6, 2018 · 2 comments

Comments

@sriharshamadala
Copy link

The code expects string but receives a byte string instead. Hence the following error message.

sample prints:

Fixing id3 tags
a bytes-like object is required, not 'str'
error getting album and lyrics

Steps to reproduce:

download any song using instantmusic:
$ instantmusic
Enter songname/ lyrics/ artist.. or whatever

queen bohemian rhapsody
Searching...
Found: [0] b'Queen - Bohemian Rhapsody (Official Video)'
[1] b'Bohemian Rhapsody by Queen FULL HD'
[2] b'Bohemian Rhapsody - Queen (lyrics)'
[3] b'Mix - Queen - Bohemian Rhapsody (Official Video)'
[4] b'Bohemian Rhapsody | Official Trailer [HD] | 20th Century FOX'
[5] b'Queen - Bohemian Rhapsody (Live At Wembley Stadium, Saturday 12 July 1986)'
[6] b'Queen Greatest Hits'
[7] b'Bohemian Rhapsody (Digital Remaster)'
[8] b'BOHEMIAN RHAPSODY Official Trailer (2018)'
[9] b'Queen - Live at LIVE AID 1985/07/13 [Best Version]'
[10] b'Queen - Bohemian Rhapsody [High Definition]'
[11] b'Bohemian Rhapsody'
[12] b"Queen - Don't Stop Me Now (Official Video)"
[13] b'Extreme - More Than Words'
[14] b'Queen - Another One Bites the Dust (Official Video)'
[15] b'Bohemian Rhapsody | Teaser Trailer [HD] | 20th Century FOX'
[16] b'Queen - Bohemian Rhapsody (with lyrics)'
[17] b'Bohemian Rhapsody | Muppet Music Video | The Muppets'
[18] b'[OFFICIAL VIDEO] Bohemian Rhapsody \xe2\x80\x93 Pentatonix'
Pick one: 0
Download "b'Queen - Bohemian Rhapsody (Official Video)'"? (y/n) y
Downloading
[generic] watch?v=fJ9rUzIMcZQ: Requesting header
[redirect] Following redirect to https://www.youtube.com/watch?v=fJ9rUzIMcZQ
[youtube] fJ9rUzIMcZQ: Downloading webpage
[youtube] fJ9rUzIMcZQ: Downloading video info webpage
[download] Destination: Queen - Bohemian Rhapsody (Official Video).webm
[download] 100% of 5.73MiB in 00:03
[ffmpeg] Destination: Queen - Bohemian Rhapsody (Official Video).mp3
Deleting original file Queen - Bohemian Rhapsody (Official Video).webm (pass -k to keep)
Fixing id3 tags
a bytes-like object is required, not 'str'
error getting album and lyrics
Queen Bohemian Rhapsody (Official Video)
name 'unicode' is not defined
couldnt get album art

@amisora
Copy link

amisora commented Mar 29, 2019

@sriharshamadala did you already take a look at Issue #111 ?

@starxing123
Copy link

starxing123 commented Jul 26, 2019

Hi @aminosora , It seems that is caused by the environment setting. However, I could not figure it out which part matters. Could you kindly specify what should be fixed?

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

3 participants