Redis quoted password


Trying to instal redash I have the next redis url REDASH_REDIS_URL=redis://user:pass/ .
Note the / on the password. This gives me the next error:

[2018-01-25 10:49:32 +0000] [16] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/", line 578, in spawn_worker
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/", line 126, in init_process
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/", line 135, in load_wsgi
    self.wsgi =
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/", line 65, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/", line 352, in import_app
  File "/app/redash/", line 63, in <module>
    redis_connection = create_redis_connection()
  File "/app/redash/", line 57, in create_redis_connection
    r = redis.StrictRedis(host=redis_url.hostname, port=redis_url.port, db=redis_db, password=redis_url.password)
  File "/usr/lib/python2.7/", line 113, in port
    port = int(port, 10)
ValueError: invalid literal for int() with base 10: 'pass' 

If I quote the password like REDASH_REDIS_URL=redis:// then I get ResponseError: invalid password.

Having a look to redash redis connection code you have password=redis_url.password. Something like password=urllib.unquote(redis_url.password) could fix the issue. Are there any workarounds to this issue or something else I am missing? Should I open a issue on github?


Checked the documentation of urlparse.urlparse and it explicitly doesn’t unescape values, so unquote is indeed needed. Instead of opening an issue, you can just submit the pull request :slight_smile:


There you go :wink: