kalbhor / MusicRepair

Fixes music metadata and adds album art.
MIT License
598 stars 43 forks source link

list index out of range #35

Open patreky opened 7 years ago

patreky commented 7 years ago

**> .\01 - Bombtrack .mp3 list index out of range Could not find metadata 01 - Bombtrack Unknown Unknown

.\01 - Heart Heart Heartbreak .mp3 Traceback (most recent call last): File "C:\Users\Patek\AppData\Local\Programs\Python\Python36-32\Scripts\musicrepair-script.py", line 11, in load_entry_point('musicrepair==6.2.1', 'console_scripts', 'musicrepair')() File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\musicrepair\command_line.py", line 234, in main fix_music(rename_format, norename, files) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\musicrepair\command_line.py", line 133, in fix_music artist, album, song_name, albumart = musictools.get_metadata(file_name, SPOTIFY_CLIENT_ID , SPOTIFY_CLIENT_SECRET) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\musictools\musictools.py", line 102, in get_metadata results = spotify.search(song_name, limit=1) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\spotipy\client.py", line 339, in search return self._get('search', q=q, limit=limit, offset=offset, type=type, market=market) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\spotipy\client.py", line 146, in _get return self._internal_call('GET', url, payload, kwargs) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\spotipy\client.py", line 108, in _internal_call r = self._session.request(method, url, headers=headers, proxies=self.proxies, args) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, kwargs) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\requests\adapters.py", line 440, in send timeout=timeout File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen chunked=chunked) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn conn.connect() File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connection.py", line 326, in connect sslcontext=context) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\util\ssl.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\ssl.py", line 401, in wrap_socket _context=self, _session=session) File "c:\users\patek\appdata\local\programs\python\python36-32\lib\ssl.py", line 808, in init self.do_handshake() File "c:\users\patek\appdata\local\programs\python\python36-32\lib\ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "c:\users\patek\appdata\local\programs\python\python36-32\lib\ssl.py", line 683, in do_handshake self._sslobj.do_handshake() KeyboardInterrupt

Princeyadav05 commented 7 years ago

Returns the same for every song.

> Alan Walker - Faded.mp3
list index out of range
Could not find metadata
Alan Walker - Faded
Unknown
Unknown

@kalbhor what ccould be the error.

kalbhor commented 7 years ago

Are you sure you updated musicrepair? pip install musicrepair -U

Princeyadav05 commented 7 years ago

Yes, did it now. but now when I'm entering Spotify Credentials this comes.

Traceback (most recent call last): File "/usr/local/bin/musicrepair", line 9, in <module> load_entry_point('musicrepair==6.2.1', 'console_scripts', 'musicrepair')() File "/usr/local/lib/python2.7/dist-packages/musicrepair-6.2.1-py2.7.egg/musicrepair/command_line.py", line 223, in main add_config() File "/usr/local/lib/python2.7/dist-packages/musicrepair-6.2.1-py2.7.egg/musicrepair/command_line.py", line 62, in add_config spotify_client_id = input('Enter Spotify client ID : ') File "<string>", line 1 9846d0984e7c45e5ae2e7aaad46de551 ^ SyntaxError: unexpected EOF while parsing

patreky commented 7 years ago

i updated already before i report here but still same issue

kalbhor commented 7 years ago

@Princeyadav05 It seems like you're using python 2.7. Musicrepair works for Python 3.x.

kalbhor commented 7 years ago

@patreky Did you add the spotify credentials?

Princeyadav05 commented 7 years ago

@kalbhor I'm using python 3.5. Do you thing I should do the all process again ?

patreky commented 7 years ago

@kalbhor yes i added spotify and genius

kalbhor commented 7 years ago

I'm getting confused here. @Princeyadav05 could you open a separate issue?

kalbhor commented 7 years ago

@patreky What command did you run exactly?

Princeyadav05 commented 7 years ago

@kalbhor that issue is fixed bro. The issue left is the one mentioned here. List index out of range and unknown for every song.

patreky commented 7 years ago

@kalbhor i ran musicrepair

Princeyadav05 commented 7 years ago

@kalbhor i ran musicrepair -d path/to/directory

kalbhor commented 7 years ago

This seems strange. I tried running musicrepair on the same filenames (Alan Walker - Faded) and it seems to work for me.

Are you sure you've put the right credentials? screen shot 2017-10-01 at 8

Princeyadav05 commented 7 years ago

Yes. The credentials are correct. As I just copy pasted them.

patreky commented 7 years ago

@kalbhor im positive too that my config is correct. i just copy pasted them

kalbhor commented 7 years ago

Try following these steps once :

Let me know if the error persists.

Princeyadav05 commented 7 years ago

@kalbhor using virtual env didnt help either.

kalbhor commented 7 years ago

Post the entire output here once. Along with the command you ran.

Princeyadav05 commented 7 years ago
(venv) prince@prince-X555LJ:~                                                                                                                                                                                                 [20:34:48]
$ musicrepair -d /media/prince/A8769E3C769E0B68/DataPartition/Test

> Aadat       .mp3
list index out of range
Could not find metadata
Aadat       
Unknown
Unknown

> Aao Raja - Songspk.LINK       .mp3
list index out of range
Could not find metadata
Aao Raja - Songspk.LINK       
Unknown
Unknown

> Abhi Toh Party Shuru Hui Hai (Khoobsurat) - MyMp3Song.Com       .mp3
list index out of range
Could not find metadata
Abhi Toh Party Shuru Hui Hai (Khoobsurat) - MyMp3Song.Com       
Unknown
Unknown

> Alan Walker - Faded     .mp3
list index out of range
Could not find metadata
Alan Walker - Faded     
Unknown
Unknown

> Animals | wap10.net      .mp3
list index out of range
Could not find metadata
Animals | wap10.net      
Unknown
Unknown

> Axwell Λ Ingrosso - On My Way      .mp3
list index out of range
Could not find metadata
Axwell Λ Ingrosso - On My Way      
Unknown
Unknown

> Bulleya Ae Dil Hai Mushkil - PagalWorld.com      .mp3
list index out of range
Could not find metadata
Bulleya Ae Dil Hai Mushkil - PagalWorld.com      
Unknown
Unknown

> Cinema (Skrillex remix)      .mp3
list index out of range
Could not find metadata
Cinema (Skrillex remix)      
Unknown
Unknown

> Crunk (Afrojack edit)     .mp3
list index out of range
Could not find metadata
Crunk (Afrojack edit)     
Unknown
Unknown

Finished repairing
patreky commented 7 years ago

@kalbhor i forgot to mention im using win10

Princeyadav05 commented 7 years ago

@kalbhor i'm on ubuntu gnome brother.