title: redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a byte, string or number first
body: <p>I've recently started to use Redis and RQ to run background processes. I built a Dash app which works fine on Heroku and used to work locally as well. Recently, I tried to test the same app locally again and I keep getting the following error - although I'm using exactly the same code hosted on Heroku:</p>
  
  <pre><code>redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a byte, string or number first.
  </code></pre>
  
  <p>In my requirements.txt and virtual env on Ubuntu 18.04 I have redis v.3.0.1, rq 0.13.0</p>
  
  <p>When I run redis-server on my terminal I see that Redis 4.0.9 is used (that's also confusing to me).</p>
  
  <p>I tried to google for two days looking for a solution with no avail.</p>
  
  <p>Has anyone an idea of what might have happened and how to solve this error?</p>
  
  <p>Here is the full relevant traceback:</p>
  
  <pre><code>File "/home/tom/dashenv/pb101_models/pages/cumulative_culture.py", line 1026, in stop_or_start_update
    job = q.fetch_job(job_id)
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/rq/queue.py", line 142, in fetch_job
    self.remove(job_id)
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/rq/queue.py", line 186, in remove
    return self.connection.lrem(self.key, 1, job_id)
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/redis/client.py", line 1580, in lrem
    return self.execute_command('LREM', name, count, value)
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/redis/client.py", line 754, in execute_command
    connection.send_command(*args)
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/redis/connection.py", line 619, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/redis/connection.py", line 659, in pack_command
    for arg in imap(self.encoder.encode, args):
  File "/home/tom/dashenv/dash/lib/python3.6/site-packages/redis/connection.py", line 124, in encode
    "byte, string or number first." % typename)
  redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a byte, string or number first.
  </code></pre>
  
  <p>Thanks in advance for any suggestion/hint.</p>
  
  <p>All best,
  Tom</p>