Issue Summary
When trying any Python query, I get the following error: Error running query: 'NoneType' object has no attribute 'annotate_query'
Technical details:
- Redash Version: 8.0.0.b32245
- Browser/OS: Ubuntu
- How did you install Redash: Setup script : https://github.com/getredash/setup (commit cb47626b6823cbafac407b3e8991e97f53121f6e)
Redash hosted on a Docker container, itself on an Ubuntu VM.
Enabled Python query by inserting
REDASH_ADDITIONAL_QUERY_RUNNERS: redash.query_runner.python
in the docker-compse.yml file under service>server>environment.
After running docker-compose restart
, I was able to create a Python data Source. When trying any python script, I get the error : Error running query: 'NoneType' object has no attribute 'annotate_query'
.
By looking into the docker-compose logs, I assume the error comes from the adhoc_worker:
adhoc_worker_1 | Traceback (most recent call last):
adhoc_worker_1 | File "/usr/local/lib/python2.7/site-packages/celery/app/trace.py", line 385, in trace_task
adhoc_worker_1 | R = retval = fun(*args, **kwargs)
adhoc_worker_1 | File "/app/redash/worker.py", line 84, in __call__
adhoc_worker_1 | return TaskBase.__call__(self, *args, **kwargs)
adhoc_worker_1 | File "/usr/local/lib/python2.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
adhoc_worker_1 | return self.run(*args, **kwargs)
adhoc_worker_1 | File "/app/redash/tasks/queries.py", line 436, in execute_query
adhoc_worker_1 | scheduled_query).run()
adhoc_worker_1 | File "/app/redash/tasks/queries.py", line 358, in run
adhoc_worker_1 | annotated_query = self._annotate_query(query_runner)
adhoc_worker_1 | File "/app/redash/tasks/queries.py", line 408, in _annotate_query
adhoc_worker_1 | return query_runner.annotate_query(self.query, self.metadata)
adhoc_worker_1 | AttributeError: 'NoneType' object has no attribute 'annotate_query'
May someone help me with this issue ?