--> -->
 
 
KeyboardInterrupt
Python 3.6.9: /usr/bin/python3
Thu Dec 1 20:44:18 2022

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/engenrepix.cgi in <module>()
    372 if not data:
    373     if genre:
=>  374         genrecentroid = [x for x in loadcentroidsflat('/home/glennm/playlists/data/genre_centroids.csv') if x['genre'] == genre][0]
    375         data = loadcentroidsflat(centroidfilename, genre, '/home/glennm/playlists/data/genre_examples/%s.json' % make_filename(genre))
    376     else:
genrecentroid undefined, x undefined, loadcentroidsflat = <function loadcentroidsflat>, genre = 'catalan folk'
 /home/glennm/playlists/centroid.py in loadcentroidsflat(centroid_file='/home/glennm/playlists/data/genre_centroids.csv', loadgenre=None, exfilename=None)
    138     centroids = []
    139     with open(centroid_file) as gcfile:
=>  140         allgenres = set([g['name'] for g in requests.get(genrebase + "/getGenreList").json()])
    141         csvr = csv.reader(gcfile)
    142         headers = next(csvr)
allgenres undefined, builtin set = <class 'set'>, g undefined, global requests = <module 'requests' from '/usr/lib/python3/dist-packages/requests/__init__.py'>, requests.get = <function get>, global genrebase = 'http://genre-config-production.spotify.net:8085', ).json undefined
 /usr/lib/python3/dist-packages/requests/api.py in get(url='http://genre-config-production.spotify.net:8085/getGenreList', params=None, **kwargs={'allow_redirects': True})
     70 
     71     kwargs.setdefault('allow_redirects', True)
=>   72     return request('get', url, params=params, **kwargs)
     73 
     74 
global request = <function request>, url = 'http://genre-config-production.spotify.net:8085/getGenreList', params = None, kwargs = {'allow_redirects': True}
 /usr/lib/python3/dist-packages/requests/api.py in request(method='get', url='http://genre-config-production.spotify.net:8085/getGenreList', **kwargs={'allow_redirects': True, 'params': None})
     56     # cases, and look like a memory leak in others.
     57     with sessions.Session() as session:
=>   58         return session.request(method=method, url=url, **kwargs)
     59 
     60 
session = <requests.sessions.Session object>, session.request = <bound method Session.request of <requests.sessions.Session object>>, method = 'get', url = 'http://genre-config-production.spotify.net:8085/getGenreList', kwargs = {'allow_redirects': True, 'params': None}
 /usr/lib/python3/dist-packages/requests/sessions.py in request(self=<requests.sessions.Session object>, method='get', url='http://genre-config-production.spotify.net:8085/getGenreList', params=None, data=None, headers=None, cookies=None, files=None, auth=None, timeout=None, allow_redirects=True, proxies={}, hooks=None, stream=None, verify=None, cert=None, json=None)
    518         }
    519         send_kwargs.update(settings)
=>  520         resp = self.send(prep, **send_kwargs)
    521 
    522         return resp
resp undefined, self = <requests.sessions.Session object>, self.send = <bound method Session.send of <requests.sessions.Session object>>, prep = <PreparedRequest [GET]>, send_kwargs = {'allow_redirects': True, 'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, 'verify': True}
 /usr/lib/python3/dist-packages/requests/sessions.py in send(self=<requests.sessions.Session object>, request=<PreparedRequest [GET]>, **kwargs={'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, 'verify': True})
    628 
    629         # Send the request
=>  630         r = adapter.send(request, **kwargs)
    631 
    632         # Total elapsed time of the request (approximately)
r undefined, adapter = <requests.adapters.HTTPAdapter object>, adapter.send = <bound method HTTPAdapter.send of <requests.adapters.HTTPAdapter object>>, request = <PreparedRequest [GET]>, kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, 'verify': True}
 /usr/lib/python3/dist-packages/requests/adapters.py in send(self=<requests.adapters.HTTPAdapter object>, request=<PreparedRequest [GET]>, stream=False, timeout=<urllib3.util.timeout.Timeout object>, verify=True, cert=None, proxies=OrderedDict())
    438                     decode_content=False,
    439                     retries=self.max_retries,
=>  440                     timeout=timeout
    441                 )
    442 
timeout = <urllib3.util.timeout.Timeout object>
 /usr/lib/python3/dist-packages/urllib3/connectionpool.py in urlopen(self=<urllib3.connectionpool.HTTPConnectionPool object>, method='GET', url='/getGenreList', body=None, headers={'User-Agent': 'python-requests/2.18.4', 'Accept...te', 'Accept': '*/*', 'Connection': 'keep-alive'}, retries=Retry(total=0, connect=None, read=False, redirect=None, status=None), redirect=False, assert_same_host=False, timeout=<urllib3.util.timeout.Timeout object>, pool_timeout=None, release_conn=False, chunked=False, body_pos=None, **response_kw={'decode_content': False, 'preload_content': False})
    599                                                   timeout=timeout_obj,
    600                                                   body=body, headers=headers,
=>  601                                                   chunked=chunked)
    602 
    603             # If we're going to release the connection in ``finally:``, then
chunked = False
 /usr/lib/python3/dist-packages/urllib3/connectionpool.py in _make_request(self=<urllib3.connectionpool.HTTPConnectionPool object>, conn=<urllib3.connection.HTTPConnection object>, method='GET', url='/getGenreList', timeout=<urllib3.util.timeout.Timeout object>, chunked=False, **httplib_request_kw={'body': None, 'headers': {'User-Agent': 'python-requests/2.18.4', 'Accept...te', 'Accept': '*/*', 'Connection': 'keep-alive'}})
    381             except TypeError:  # Python 2.6 and older, Python 3
    382                 try:
=>  383                     httplib_response = conn.getresponse()
    384                 except Exception as e:
    385                     # Remove the TypeError from the exception chain in Python 3;
httplib_response undefined, conn = <urllib3.connection.HTTPConnection object>, conn.getresponse = <bound method HTTPConnection.getresponse of <urllib3.connection.HTTPConnection object>>
 /usr/lib/python3.6/http/client.py in getresponse(self=<urllib3.connection.HTTPConnection object>)
   1375         try:
   1376             try:
=> 1377                 response.begin()
   1378             except ConnectionError:
   1379                 self.close()
response = <http.client.HTTPResponse object>, response.begin = <bound method HTTPResponse.begin of <http.client.HTTPResponse object>>
 /usr/lib/python3.6/http/client.py in begin(self=<http.client.HTTPResponse object>)
    318         # read until we get a non-100 response
    319         while True:
=>  320             version, status, reason = self._read_status()
    321             if status != CONTINUE:
    322                 break
version undefined, status undefined, reason undefined, self = <http.client.HTTPResponse object>, self._read_status = <bound method HTTPResponse._read_status of <http.client.HTTPResponse object>>
 /usr/lib/python3.6/http/client.py in _read_status(self=<http.client.HTTPResponse object>)
    279 
    280     def _read_status(self):
=>  281         line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    282         if len(line) > _MAXLINE:
    283             raise LineTooLong("status line")
line undefined, builtin str = <class 'str'>, self = <http.client.HTTPResponse object>, self.fp = None, self.fp.readline undefined, global _MAXLINE = 65536
 /usr/lib/python3.6/socket.py in readinto(self=<socket.SocketIO object>, b=<memory>)
    584         while True:
    585             try:
=>  586                 return self._sock.recv_into(b)
    587             except timeout:
    588                 self._timeout_occurred = True
self = <socket.SocketIO object>, self._sock = None, self._sock.recv_into undefined, b = <memory>

KeyboardInterrupt:
      args = ()
      with_traceback = <built-in method with_traceback of KeyboardInterrupt object>