Instant-Music-Downloader icon indicating copy to clipboard operation
Instant-Music-Downloader copied to clipboard

Python 2.7 import eyed3 fails

Open Flashwalker opened this issue 7 years ago • 10 comments

pip (Python 2.7) installed version fails with import eyed3 module.
It must be: import eyeD3 But despite this it still does not work

...
Fixing id3 tags
global name 'eyed3' is not defined
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

Flashwalker avatar May 25 '17 21:05 Flashwalker

hi @Flashwalker ,

i have seen your #117, #118, #119.

i'm repackaging this repo, because it can't run on python3. see #114

do you mind to run it with that and see if any of these issue solved.

rachmadaniHaryono avatar May 26 '17 01:05 rachmadaniHaryono

I just tested feature/py3-run branch, and it has the same issue: script works as in main master branch, if i change import eyed3 to import eyeD3: downloading works, but fails to write id3 tags:

...
[ffmpeg] Destination: Баста - Сансара (2017) New.mp3
Deleting original file Баста - Сансара (2017) New.webm (pass -k to keep)
Fixing id3 tags
global name 'eyed3' is not defined
error getting album and lyrics
Баста   Сансара (2017) New 
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
couldnt get album art
Downloaded: Баста - Сансара (2017) New

Flashwalker avatar May 26 '17 21:05 Flashwalker

The previous comment was about Python2.7 test.

Just tested with Python3.4:

  • Now there is escaped text only in prompt and result lines:
Searching...
Found:
 [0] Баста - Сансара (при уч. Д.Арбенина, A.Ф.Скляр, С.Бобунец, SunSay, Ант (25/17) и Скриптонит)
[1] Баста - Сансара (2017) New
[2] Вечерний Ургант. Баста — «Сансара». Фрагмент выпуска от 14.04.2017
[3] Микс – Баста - Сансара (при уч. Д.Арбенина, A.Ф.Скляр, С.Бобунец, SunSay, Ант (25/17) и Скриптонит)
[4] Диана Арбенина на концерте Басты. "Сансара"
[5] Баста 360 Олимпийский 2017 Сансара
[6] Баста - Сансара (Караоке, Новинка 2017)
[7] Как играть БАСТА - САНСАРА | Разбор COrus Guitar Guide #41
[8] Как играть: БАСТА - САНСАРА на гитаре (Полный Разбор Песни)
[9] Баста - Сансара. Близким...
[10] Баста - Сансара / Кавер Маша Кольцова
[11] Баста - Сансара. Олимпийский 22 апреля 2017 концерт. Диана Арбенина, Вася и его дочка. Live.
[12] Реакция на Баста - Сансара (клип, 2017)
[13] Charusha - Сансара (при уч. Скриптонит)
[14] БАСТА - САНСАРА (Кавер Гитара + Скрипка + Флейта)
[15] Баста - Сансара (Когда меня не станет) live
[16] Баста 2017 Закон #Сансара (feat. Диана Арбенина, Александр Ф. Скляр, Сергей Бобуне - Баста)
[17] Баста - Сансара (2017) +Текст
[18] Баста - Сансара / Когда меня не станет (live Уфа, Дворец спорта, 08.04.2017)
Pick one: 1
Download "b'\xd0\x91\xd0\xb0\xd1\x81\xd1\x82\xd0\xb0 - \xd0\xa1\xd0\xb0\xd0\xbd\xd1\x81\xd0\xb0\xd1\x80\xd0\xb0 (2017) New'"? (y/n) y
Downloading
[youtube] kjOwBtondGQ: Downloading webpage
[youtube] kjOwBtondGQ: Downloading video info webpage
[youtube] kjOwBtondGQ: Extracting video information
[download] Destination: Баста - Сансара (2017) New.webm
[download] 100% of 5.97MiB in 00:20
[ffmpeg] Destination: Баста - Сансара (2017) New.mp3
Deleting original file Баста - Сансара (2017) New.webm (pass -k to keep)
Fixing id3 tags
'str' does not support the buffer interface
couldnt get album art
Downloaded: b'\xd0\x91\xd0\xb0\xd1\x81\xd1\x82\xd0\xb0 - \xd0\xa1\xd0\xb0\xd0\xbd\xd1\x81\xd0\xb0\xd1\x80\xd0\xb0 (2017) New'
  • And id3 tags not written.

Flashwalker avatar May 26 '17 22:05 Flashwalker

iirc until my recent masterbranch the eyed3 is not yet tested.

eyed3 just recently fixed python3 compatibility https://bitbucket.org/nicfit/eyed3/issues/25/python-3-compatibilty (2017-03-13) so i haven't test it yet, and also the requirement haven't change (eyed3 have released 0.8 on 2017-05-13). i will put that on to do list https://github.com/rachmadaniHaryono/Instant-Music-Downloader/issues/1

the pr branch is only to make the program runnable on python3. my master branch, which have more commit, work but with several limitation (eyed3, and lyric problem)

e: the master branch is only working on python3 with python3.5 for testing

rachmadaniHaryono avatar May 26 '17 22:05 rachmadaniHaryono

Thanks, i appreciate your attention.

Flashwalker avatar May 26 '17 22:05 Flashwalker

just little bit update, the title on download confirmation and download finished update should be fixed now.

12783dfd4b4a57f744207e01343d9d856957241c

for eyed3 title and artist i'm planning to give user option,

  • simple detection from title or
  • user input it manually or
  • use beetbox/beets to determine the title and artist.

rachmadaniHaryono avatar May 26 '17 22:05 rachmadaniHaryono

Thanks! Looks really interesting.

yask123 avatar May 28 '17 06:05 yask123

@yask123, glad you are back. any intention to merging the pr?

rachmadaniHaryono avatar May 28 '17 06:05 rachmadaniHaryono

Yea, give me some time. I'll review the code and merge soon.

yask123 avatar May 28 '17 08:05 yask123

pip install eyeD3 pip install python_magic_bin==0.4.14

Will make it work

SANTOSH2959 avatar Mar 03 '18 14:03 SANTOSH2959