dhruv-ahuja / spoti-dl

spoti-dl: download songs, albums and playlists using Spotify links
https://pypi.org/project/spoti-dl/
MIT License
68 stars 7 forks source link

Unable to write metadata for song! #10

Open nethakha opened 9 months ago

nethakha commented 9 months ago

When I try to download a particular song, I get "Unable to write metadata for song!

How can I resolve this issue?

dhruv-ahuja commented 9 months ago

Hi, can you please share the log file with name spotidl.log found at home directory?

nethakha commented 9 months ago

09/02/2024 10:37:14 PM | WARNING: Couldn't read cache at: .cache 09/02/2024 10:37:18 PM | WARNING: Couldn't write token to cache at: .cache 09/02/2024 10:37:30 PM | ERROR: error 指定されたパスが見つかりません。 (os error 3) opening song file "C:\Users\tokut/dl\再生\→真逆様←.opus" for writing metadata 09/02/2024 10:40:01 PM | WARNING: Couldn't read cache at: .cache 09/02/2024 10:40:05 PM | WARNING: Couldn't write token to cache at: .cache 09/02/2024 10:40:08 PM | ERROR: error 指定されたパスが見つかりません。 (os error 3) opening song file "C:\Users\tokut/dl\再生\5 →真逆様←.opus" for writing metadata

dhruv-ahuja commented 9 months ago

Thanks for sharing this, can you please try running the app as admin? For windows, that would require opening the terminal/command line as admin and then running spoti-dl.

nethakha commented 9 months ago

Thank you, I was able to download the desired sound source! However, when I tried to download another sound source, the problem occurred again. Here is the contents of the log file.

21/02/2024 09:32:20 PM | WARNING: Couldn't read cache at: .cache 21/02/2024 09:32:23 PM | WARNING: Couldn't write token to cache at: .cache 21/02/2024 09:32:26 PM | ERROR: error 指定されたパスが見つかりません。 (os error 3) opening song file "C:\Users\tokut/dl\futuring Prod.Morning Lemon\futuring ProdMorning Lemon.opus" for writing metadata

dhruv-ahuja commented 9 months ago

Okay, I see. I will look into this. Thanks for reporting this issue.

dhruv-ahuja commented 5 months ago

@nethakha Hey, sorry for the late update -- was having issues with my systems and hence was unable to build the Windows version of the app for a long time. Can you please update the app to version 2.1.2 -- it should fix your issue now. python3 -m pip install --upgrade spoti-dl==2.1.2 or pip install --upgrade spoti-dl==2.1.2 is what you need to do, might need adjustments since python setup can vary from system to system.

nethakha commented 5 months ago

Thanks for the update. I tried it but it did not work.

Below is the log.

13/06/2024 05:06:28 PM | WARNING: Couldn't read cache at: .cache
13/06/2024 05:06:30 PM | WARNING: Couldn't write token to cache at: .cache
13/06/2024 05:06:31 PM | ERROR: error 指定されたファイルが見つかりません。 (os error 2) opening song file "C:\\Users\\tokut\\dl\\futuring ProdMorning Lemon.opus" for writing metadata

I don't know if this is related, but it appears that the ". seems to have been removed from the file name. The name of the song is "futuring Prod.Morning Lemon", but in the log it is "futuring ProdMorning Lemon".

I hope the problem will be resolved.

dhruv-ahuja commented 5 months ago

Oh right, that could be the case. I'll look into this when time permits, and get back to you. Could you please share the song link(s) that caused you the trouble?

nethakha commented 5 months ago

This song. https://open.spotify.com/intl-ja/track/5amIghCsQS7andDFxrvNi3?si=2914aaee57ba4b4d

dhruv-ahuja commented 5 months ago

Could you share what command are you using exactly, and the path to the dl folder (running just cd in your terminal will show the path)? I tried downloading the same song on my windows machine and had no issues there. There might be some permission issues, can you try downloading the song in some other drive other than the c: drive?

The . (and other characters) in the song name is replaced to avoid any issues when creating files, so that's not the issue here.

nethakha commented 5 months ago

I tried the following three commands.

spoti-dl spotify:track:5amIghCsQS7andDFxrvNi3
spoti-dl https://open.spotify.com/intl-ja/track/5amIghCsQS7andDFxrvNi3
spoti-dl https://open.spotify.com/intl-ja/album/6tAqWourYOmhQikvkEzwk3

The dl folder is located directly under the user directory.

C:\Users\tokut\dl

I tried executing it by specifying a download destination to a drive other than the C drive, but the result did not change.