Query errors after upgrading to 7.0

Issue Summary

After running bin/upgrade from 6.0 most queries and refreshes fail with this error:

[2019-07-12 07:03:55,106][PID:1704][INFO][root] Inserting job for 7f6d8a6588dd541bf4197d66c0cd98bd with metadata={'Username': u'xxx@xxx.com', 'Query ID': u'2893'}
[2019-07-12 07:03:55,107][PID:1704][INFO][root] [7f6d8a6588dd541bf4197d66c0cd98bd] Found existing job: 2fed707b-dd3b-496e-9e7d-67af894c8a91
[2019-07-12 07:03:55,107] ERROR in app: Exception on /api/queries/2893/results [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 477, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 228, in decorated_view
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/base.py", line 31, in dispatch_request
    return super(BaseResource, self).dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 587, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/permissions.py", line 48, in decorated
    return fn(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/query_results.py", line 208, in post
    return run_query(query.parameterized, parameters, query.data_source, query_id, max_age)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/query_results.py", line 94, in run_query
    "Query ID": query_id
  File "/opt/redash/redash.7.0.0.b17535/redash/tasks/queries.py", line 115, in enqueue_query
    if job.ready():
  File "/opt/redash/redash.7.0.0.b17535/redash/tasks/queries.py", line 91, in ready
    return self._async_result.ready()
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 311, in ready
    return self.state in self.backend.READY_STATES
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 471, in state
    return self._get_task_meta()['status']
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 410, in _get_task_meta
    return self._maybe_set_cache(self.backend.get_task_meta(self.id))
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 365, in get_task_meta
    meta = self._get_task_meta_for(task_id)
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 680, in _get_task_meta_for
    return self.decode_result(meta)
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 284, in decode_result
    return self.meta_from_decoded(self.decode(payload))
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 280, in meta_from_decoded
    meta['result'] = self.exception_to_python(meta['result'])
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 260, in exception_to_python
    exc = cls(*exc_msg if isinstance(exc_msg, tuple) else exc_msg)
TypeError: __init__() takes at least 4 arguments (2 given)
[2019-07-12 07:03:55,107][PID:1704][ERROR][redash] Exception on /api/queries/2893/results [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 477, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 228, in decorated_view
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/base.py", line 31, in dispatch_request
    return super(BaseResource, self).dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 587, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/permissions.py", line 48, in decorated
    return fn(*args, **kwargs)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/query_results.py", line 208, in post
    return run_query(query.parameterized, parameters, query.data_source, query_id, max_age)
  File "/opt/redash/redash.7.0.0.b17535/redash/handlers/query_results.py", line 94, in run_query
    "Query ID": query_id
  File "/opt/redash/redash.7.0.0.b17535/redash/tasks/queries.py", line 115, in enqueue_query
    if job.ready():
  File "/opt/redash/redash.7.0.0.b17535/redash/tasks/queries.py", line 91, in ready
    return self._async_result.ready()
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 311, in ready
    return self.state in self.backend.READY_STATES
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 471, in state
    return self._get_task_meta()['status']
  File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 410, in _get_task_meta
    return self._maybe_set_cache(self.backend.get_task_meta(self.id))
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 365, in get_task_meta
    meta = self._get_task_meta_for(task_id)
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 680, in _get_task_meta_for
    return self.decode_result(meta)
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 284, in decode_result
    return self.meta_from_decoded(self.decode(payload))
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 280, in meta_from_decoded
    meta['result'] = self.exception_to_python(meta['result'])
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 260, in exception_to_python
    exc = cls(*exc_msg if isinstance(exc_msg, tuple) else exc_msg)
TypeError: __init__() takes at least 4 arguments (2 given)

Technical details:

  • Redash Version: 6.0.0+b8536 to 7.0.0+b17535
  • Browser/OS: Linux ip-172-31-10-112 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • How did you install Redash: Non-docker way