teticio/Deej-AI

m3u playlist generation: KeyError: 'file.mp3'

Closed this issue · 1 comments

askz commented

Hello, and thanks for the good work :)

I have an issue when I try to generate a playlist, I tried with various input songs and get the same error.

Thanks in advance :)

 python Deej-A.I.py Pickles mp3tovec --playlist playlist_outfile.m3u --inputsong max-sharks/Soul\ Edifice\ -\ National\ Insurrection.mp3
26 MP3s
Outfile playlist: playlist_outfile.m3u
Input song selected: max-sharks/Soul Edifice - National Insurrection.mp3
Requested None songs
Traceback (most recent call last):
  File "Deej-A.I.py", line 488, in <module>
    tracks = make_playlist([input_song], size=n_songs + 1, noise=noise, lookback=lookback)
  File "Deej-A.I.py", line 208, in make_playlist
    similar = most_similar(positive=playlist[-lookback:], topn=max_tries, noise=noise)
  File "Deej-A.I.py", line 179, in most_similar
    mp3_vec_i = np.sum([mp3tovec[i] for i in positive] + [-mp3tovec[i] for i in negative], axis=0)
  File "Deej-A.I.py", line 179, in <listcomp>
    mp3_vec_i = np.sum([mp3tovec[i] for i in positive] + [-mp3tovec[i] for i in negative], axis=0)
KeyError: 'max-sharks/Soul Edifice - National Insurrection.mp3'

Have you run the --scan process? It needs to precalcuate the vectors and store them in the "Pickles" directory before it can start to generate playlists. Sorry if the instructions were confusing.