Closed ehakin919 closed 1 year ago
Hello! I seem to be having a similar issue. Currently trying to write a program that gets tracks from my "Tracks" list and writes the information into a CSV file.
tidal_session = tidalapi.session.Session()
tidal_session.login_oauth_simple()
tidal_session.check_login() # == True
tidal_user = tidal_session.user
user_id = tidal_user.id
def get_favorite_tracks():
favorites = tidalapi.user.Favorites(tidal_session, user_id)
favorite_tracks = favorites.tracks()
The following is the Error message that i get:
HTTP error on 404
Traceback (most recent call last):
File "/home/tidal_csv_downloader.py", line 85, in <module>
main()
File "/home/*/tidal_csv_downloader.py", line 76, in main
get_favorite_tracks()
File "/home/*/tidal_csv_downloader.py", line 12, in get_favorite_tracks
favorite_tracks = favorites.tracks()
File "/home/*/.local/lib/python3.10/site-packages/tidalapi/user.py", line 344, in tracks
return self.requests.map_request(
File "/home/*/.local/lib/python3.10/site-packages/tidalapi/request.py", line 116, in map_request
json_obj = self.request('GET', url, params).json()
File "/home/*/.local/lib/python3.10/site-packages/tidalapi/request.py", line 99, in request
request.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.tidal.com/v1/users/favorites/tracks?sessionId=********-****-****-****-************&countryCode=CH&limit=1000&offset=0
The OAuth login process works flawlessly. Are there different Tokens that require a different configuration / different parameters? I am quite new to coding as a whole so excuse me if i am missing something really obvious :)
Maybe you found a solution @ehakin919 ? :D Thanks for reading!
EDIT 2023.06.04: Okay so i seem to have "figured out the problem", as in i scrapped everything and re-wrote it. I think it was some name space / scope issue, i used functions etc. so i am guessing it got something to do with that. This gave me the chance to read through the 'tidalapi' code though and learn about how 'git' works a bit, so that's very nice :). I will further read through the code of this API, get some more coding experience and hope i can contribute to the project at one point! Greetings, Will
Closing this as it looks like OP already solved the issue.
Hey all, been using this API to migrate from Spotify -> Tidal, and I'd like to programmatically add in my extensive library using this API. Having the below issue when attempting to add an album to my favorites.
Any help would be appreciated.
Thanks
Returns:
I've removed username from the 404 response URL