C2W2 - Batch Processing Attribute Error on Exercise 2

Hi everyone,
I’ve been trying to troubleshoot this, but I haven’t been able to resolve it.

After running this part of the exercise:
responses = paginated_new_releases(endpoint_request=get_new_releases,
url=URL_NEW_RELEASES,
access_token=token.get(‘access_token’),
offset=0, limit=20)

I’m getting this error:

These are my kwargs:
kwargs = {

        "url": url,
        "access_token": access_token,
        "offset": offset,
        "limit": limit
    } 

Could someone help me with this?

Thank you in advance!

Hello @devnam,

I could reproduce your issue in Exercise 2, when you update the offset value with the current value from the request you did plus the limit value. You used:

offset = response.get('offset').get('offset') + limit
instead of
offset = response.get('albums').get('offset') + limit

Hope it helps

1 Like

Thank you! Yes that did!

1 Like