title: Error in downloading data using API (python)
body: <p>I am trying to download a dataset using the following code from a publicly available platform that was used before for the same purpose. However, I am not sure why I get this error, that is, whether because of an error in code or some changes in the website's (hatebase) API. Any suggestions would be very helpful. Thank you.</p>
  <pre><code>import json 
  import requests
  import pandas as pd
  from hatebase import HatebaseAPI
  
  key = &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAAAA&quot; # this is the key
  filepath = &quot;/dictionary.csv&quot;  
  
  hatebase = HatebaseAPI({&quot;key&quot;: key})
  filters = {&quot;language&quot;: &quot;eng&quot;}
  format = &quot;json&quot;
  # initialize list for all vocabulary entry dictionaries
  eng_vocab = []
  response = hatebase.getVocabulary(filters=filters, format=format)
  pages = response[&quot;number_of_pages&quot;]
  # fill the vocabulary list with all entries of all pages
  # this might take some time...
  for page in range(1, pages+1):
      filters[&quot;page&quot;] = str(page) 
      response = hatebase.getVocabulary(filters=filters, format=format)
      eng_vocab.append(response[&quot;result&quot;])
  
  # create empty pandas df for all vocabulary entries
  df_eng_vocab = pd.DataFrame()
  # fill df
  for elem in eng_vocab:
      df_eng_vocab = df_eng_vocab.append(elem)
  # reset the df index
  df_eng_vocab.reset_index(drop=True, inplace=True) 
  # saving the file to csv
  df_eng_vocab.to_csv(filepath)
  </code></pre>
  <p>The error I get is the following</p>
  <pre><code>Please check your API-Key, Authentication did nod respond with a token.
  ---------------------------------------------------------------------------
  UnboundLocalError                         Traceback (most recent call last)
  &lt;ipython-input-60-de9970a761e5&gt; in &lt;module&gt;
        7 #filepath = &quot;/dictionary.csv&quot; 
        8 
  ----&gt; 9 hatebase = HatebaseAPI({&quot;key&quot;: key})
       10 filters = {&quot;language&quot;: &quot;eng&quot;}
       11 format = &quot;json&quot;
  
  ~\Anaconda3\lib\site-packages\hatebase\__init__.py in __init__(self, settings)
       37             self.debug = settings[&quot;debug&quot;]
       38 
  ---&gt; 39         self.authenticate()
       40 
       41     def authenticate(self):
  
  ~\Anaconda3\lib\site-packages\hatebase\__init__.py in authenticate(self)
       57             print(&quot;Please check your API-Key, Authentication did nod respond with a token.&quot;)
       58 
  ---&gt; 59         if token is not None:
       60             self.token = response.json()[&quot;result&quot;][&quot;token&quot;]
       61         else:
  
  UnboundLocalError: local variable 'token' referenced before assignment
  </code></pre>