Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Task superset.sql_lab.get_sql_results #2165

Closed
febinsathar opened this issue Feb 14, 2017 · 1 comment
Closed

Error in Task superset.sql_lab.get_sql_results #2165

febinsathar opened this issue Feb 14, 2017 · 1 comment

Comments

@febinsathar
Copy link

febinsathar commented Feb 14, 2017

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

@xrmx
Copy link
Contributor

xrmx commented Feb 14, 2017

I think this is #2034

@xrmx xrmx closed this as completed Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants