I have installed latest version redash with docker and created custom source:

docker-compose.yml

added volume (inside redash/query_runner folder i have kept Customsource.py file
volumes:
- “redash:/app/redash”

added environment in docker-compose:
REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.Customsource

after running redash shows my custom data source, after querying I am getting below error:

AttributeError: ‘NoneType’ object has no attribute ‘annotate_query’

error in scheduler:

raised unexpected: AttributeError("‘NoneType’ object has no attribute ‘annotate_query’",)
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/celery/app/trace.py”, line 385, in trace_task
R = retval = fun(*args, **kwargs)
File “/app/redash/worker.py”, line 84, in call
return TaskBase.call(self, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/celery/app/trace.py”, line 648, in protected_call
return self.run(*args, **kwargs)
File “/app/redash/tasks/queries.py”, line 436, in execute_query
scheduled_query).run()
File “/app/redash/tasks/queries.py”, line 358, in run
annotated_query = self._annotate_query(query_runner)
File “/app/redash/tasks/queries.py”, line 408, in _annotate_query
return query_runner.annotate_query(self.query, self.metadata)
AttributeError: ‘NoneType’ object has no attribute ‘annotate_query’

you can check if any module import error.maybe some module can not import in your custom data source