title: Python Error 'NoneType' object cannot be interpreted as an integer issue?
body: <p>I am trying to run the following piece of code but I always get that error,Python Error 'NoneType' object cannot be interpreted as an integer, any help?</p>
  
  <pre><code>  sent_maxlen= None
  
  
  def get_fixed_size(sents):
          """
          Partition sents into lists of sent_maxlen elements
          (execept the last in each sentence, which might be shorter)
          """
          return [sent[s_ind : s_ind + sent_maxlen]
                  for sent in sents
                  for s_ind in range(0, len(sent), sent_maxlen)] 
  </code></pre>