I copied the client id and secret and paste it into env. While working on Exercise 1, it returns the following error. I tested with other GET Apis. Everytime I am getting this error.
I checked that I am getting the access token and this is still valid that time.
<class ‘requests.models.Response’>
{‘access_token’: ‘BQAt… …y8AwdXunMOrjnlMzhBaCTZ-cCIx0_YxiRqA_9juejLQLIsI’, ‘token_type’: ‘Bearer’, ‘expires_in’: 3600}
Error: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/browse/featured-playlists?offset=0&limit=20
[75]:
{‘error’: {‘status’: 400, ‘message’: ‘Only valid bearer authentication supported’}}
Hello @baricsedu24
I can see that the lab has been updated about an hour ago. Can you see if this is fixed now?
Yes, I am able to work now.
I was able to see the following successful message after finishing the lab. It looks like I was able to finish all the exercises successfully. However, when I submit the lab it shows only 10/100.
Album 062urW4KS66GPlEHIueefz has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/39gMxRpFKgIVvw3krIIam5/tracks
response <Response [200]>
Album 39gMxRpFKgIVvw3krIIam5 has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/1yjQhgZzBmfdS0CTj6xQ2h/tracks
response <Response [200]>
Album 1yjQhgZzBmfdS0CTj6xQ2h has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/1uZrgmt2depCIzzN0FxfIv/tracks
response <Response [200]>
Album 1uZrgmt2depCIzzN0FxfIv has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/7A8rw0lgipeVikEBtqNAgt/tracks
response <Response [200]>
Album 7A8rw0lgipeVikEBtqNAgt has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/5HkRQub6vVhqIFDOKEFVZO/tracks
response <Response [200]>
Album 5HkRQub6vVhqIFDOKEFVZO has been processed successfully
Requesting to: https://api.spotify.com/v1/albums/4jLAzkokPOXLjGMLaLhryc/tracks
response <Response [200]>
Album 4jLAzkokPOXLjGMLaLhryc has been processed successfully
Data has been saved successfully to album_items_2024-12-03T21:17:25Z.json
Hello @baricsedu24
Maybe don’t forget to run the final part of the notebook to upload your work in S3 :
5 - Upload the Files for Grading
Run the following cell to upload the notebook and Python files ./src/main.py
, ./src/endpoint.py
into S3 bucket for grading purposes.
…
Hello @baricsedu24
@Christophe_Lancien is right, and I too think that you might have forgotten to upload your notebook before submitting.
Please, let us know if the issue persists.
Thanks all for the help. Yes, as mentioned I forgot to upload the notebook before submitting. I am all set now. Thanks again.
1 Like