--> -->
 
 
TypeError
Python 3.5.3: /usr/bin/python3
Mon Oct 18 05:05:45 2021

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/html/artistprofile.cgi in ()
    213         if artistdata:
    214             fals = getdata(urllib.parse.quote(id) + '/related-artists', 'artists')
=>  215             albums = getalbums(id, country)
    216 
    217     if artistdata:
albums undefined, getalbums = <function getalbums>, id = '42ZCvzken6DllCB1xghinZ', country = None
 /var/www/html/artistprofile.cgi in getalbums(id='42ZCvzken6DllCB1xghinZ', market=None)
     40         if 'next' in album['tracks'] and album['tracks']['next']:
     41             moretracks = getdata(album['tracks']['next'], 'items')
=>   42             album['tracks']['items'].extend(moretracks)
     43         usedate = album['release_date']
     44         if len(usedate) == 7:
album = {'album_type': 'compilation', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/13dkPjqmbcchm8cXjEJQeP'}, 'href': 'https://api.spotify.com/v1/artists/13dkPjqmbcchm8cXjEJQeP', 'id': '13dkPjqmbcchm8cXjEJQeP', 'name': 'Glenn Gould', 'type': 'artist', 'uri': 'spotify:artist:13dkPjqmbcchm8cXjEJQeP'}], 'available_markets': ['SZ'], 'copyrights': [{'text': '(P) 1956 Sony Music Entertainment/(P) 1957 Sony ...c Entertainment/(P) 1984 Sony Music Entertainment', 'type': 'P'}], 'external_ids': {'upc': '886444855716'}, 'external_urls': {'spotify': 'https://open.spotify.com/album/7hp14KNmE35pYYyJQ8aQrP'}, 'genres': [], 'href': 'https://api.spotify.com/v1/albums/7hp14KNmE35pYYyJQ8aQrP', 'id': '7hp14KNmE35pYYyJQ8aQrP', 'images': [{'height': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273fe697322a370ff119edf2505', 'width': 640}, {'height': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02fe697322a370ff119edf2505', 'width': 300}, {'height': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851fe697322a370ff119edf2505', 'width': 64}], ...}, ].extend undefined, moretracks = None

TypeError: 'NoneType' object is not iterable
      args = ("'NoneType' object is not iterable",)
      with_traceback = <built-in method with_traceback of TypeError object>