linsomniac / spotify_to_ytmusic

Copy playlists and liked music from Spotify to YTMusic
Creative Commons Zero v1.0 Universal
2.2k stars 142 forks source link

'Playlists.JSON does not exist' #68

Open JDTES04 opened 6 months ago

JDTES04 commented 6 months ago

Hi there, I'm currently running into an issue loading playlists IDs and liked songs. I press the load button, and I am getting a Errno 2 Error. No such file or directory.

Exception in thread Thread-3 (copier): Traceback (most recent call last): File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic\backend.py", line 379, in copier for src_track in src_tracks: File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic\backend.py", line 134, in iter_spotify_playlist spotify_pls = load_playlists_json(spotify_playlist_file, spotify_encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic\backend.py", line 82, in load_playlists_json return json.load(open(filename, "r", encoding=encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'playlists.json' Exception in thread Thread-4 (list_playlists): Traceback (most recent call last): File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic\cli.py", line 24, in list_playlists spotify_pls = backend.load_playlists_json() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\synic\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic\backend.py", line 82, in load_playlists_json return json.load(open(filename, "r", encoding=encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'playlists.json'

This is the code I am receiving. I am having trouble fixing it, and would appreciate any help in fixing this error.

Dejw4g commented 2 months ago

Did you find any solution? I'm having the same problem/issue

jnava19 commented 1 month ago

Check: https://github.com/linsomniac/spotify_to_ytmusic/issues/113#issuecomment-2367185744

that small change worked for me, once it loaded data was able to write the file playlists.json