I was trying to use sql lab with celery its throwing me this error
[2017-02-14 04:48:55,222: ERROR/PoolWorker-1] Task superset.sql_lab.get_sql_results[b1e0bc50-1bda-4a53-a702-3dbd926afeea] raised unexpected: TypeError("a bytes-like object is required, not 'str'",)
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.6/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/root/anaconda3/lib/python3.6/site-packages/celery/app/trace.py", line 622, in protected_call
return self.run(*args, **kwargs)
File "/root/anaconda3/lib/python3.6/site-packages/superset/sql_lab.py", line 156, in get_sql_results
results_backend.set(key, zlib.compress(payload))
TypeError: a bytes-like object is required, not 'str'
Superset version 0.15.4
Steps to reproduce
Am using redis as my celery broker
redshift is my database
my config file
from werkzeug.contrib.cache import FileSystemCache
RESULTS_BACKEND = FileSystemCache('/tmp/sqllab_cache', default_timeout=60247)
class CeleryConfig(object):
BROKER_URL = 'redis://localhost:6379/0'
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig
I was trying to use sql lab with celery its throwing me this error
[2017-02-14 04:48:55,222: ERROR/PoolWorker-1] Task superset.sql_lab.get_sql_results[b1e0bc50-1bda-4a53-a702-3dbd926afeea] raised unexpected: TypeError("a bytes-like object is required, not 'str'",)
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.6/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/root/anaconda3/lib/python3.6/site-packages/celery/app/trace.py", line 622, in protected_call
return self.run(*args, **kwargs)
File "/root/anaconda3/lib/python3.6/site-packages/superset/sql_lab.py", line 156, in get_sql_results
results_backend.set(key, zlib.compress(payload))
TypeError: a bytes-like object is required, not 'str'
Superset version 0.15.4
Steps to reproduce
Am using redis as my celery broker
redshift is my database
my config file
from werkzeug.contrib.cache import FileSystemCache
RESULTS_BACKEND = FileSystemCache('/tmp/sqllab_cache', default_timeout=60247)
class CeleryConfig(object):
BROKER_URL = 'redis://localhost:6379/0'
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig