These are chat archives for getredash/redash

9th
Feb 2016
Roy Berkowitz
@royzipuff
Feb 09 2016 11:50
@arikfr Hey Arik, float fields are automatically rounded to 2 digits after dot. Round() doesn't make a difference. is there a workaround?
on Table display
Arik Fraimovich
@arikfr
Feb 09 2016 11:52
@royzipuff currently only workaround is to convert it to string...
Roy Berkowitz
@royzipuff
Feb 09 2016 15:21
thx
CarpeFridiem
@brentonmallen1
Feb 09 2016 19:02
I'm trying to setup a mail server using sendgrid but I get the following error when trying to run the send_test_mail script: export: smtp.sendgrid.net: not a valid identifier. any thoughts?
Arik Fraimovich
@arikfr
Feb 09 2016 19:11
Seems like a syntax error in the env file.
Can you share the relevant part of the file?
CarpeFridiem
@brentonmallen1
Feb 09 2016 19:12
export REDASH_MAIL_SERVER= "smtp.sendgrid.net" # default: localhost export REDASH_MAIL_PORT=587 # default: 25 export REDASH_MAIL_USE_TLS="" # default: False export REDASH_MAIL_USE_SSL= True # default: False
Arik Fraimovich
@arikfr
Feb 09 2016 19:14
The line breaks are messed up but looks correct. Can you share the full output that you get when you run the command?
CarpeFridiem
@brentonmallen1
Feb 09 2016 19:15
bin/run ./manage.py send_test_mail
/tmp/redash_env.sRMknD: line 11: export: smtp.sendgrid.net': not a valid identifier /tmp/redash_env.sRMknD: line 16: export:password': not a valid identifier
/tmp/redash_env.sRMknD: line 17: export: `': not a valid identifier
Traceback (most recent call last):
File "/opt/redash/current/manage.py", line 9, in <module>
from redash import settings, models, version
File "/opt/redash/redash.0.9.1.b1377/redash/init.py", line 7, in <module>
from redash import settings
File "/opt/redash/redash.0.9.1.b1377/redash/settings.py", line 102, in <module>
MAIL_USE_TLS = parse_boolean(os.environ.get('REDASH_MAIL_USE_TLS', 'false'))
File "/opt/redash/redash.0.9.1.b1377/redash/settings.py", line 41, in parse_boolean
return json.loads(str.lower())
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Arik Fraimovich
@arikfr
Feb 09 2016 19:18
Try removing the comments from the env file and making sure the quotes characters are valid ones.
CarpeFridiem
@brentonmallen1
Feb 09 2016 19:22
i removed the comments. I'm not sure what you mean by valid quotes characters. I tried to source the env but that showed the same error for those lines
it seems it didn't like the spaces after the =
i was able to source without any errors but I get this new error when trying the mail test
bin/run ./manage.py send_test_mail
Traceback (most recent call last):
File "/opt/redash/current/manage.py", line 9, in <module>
from redash import settings, models, version
File "/opt/redash/redash.0.9.1.b1377/redash/init.py", line 7, in <module>
from redash import settings
File "/opt/redash/redash.0.9.1.b1377/redash/settings.py", line 102, in <module>
MAIL_USE_TLS = parse_boolean(os.environ.get('REDASH_MAIL_USE_TLS', 'false'))
File "/opt/redash/redash.0.9.1.b1377/redash/settings.py", line 41, in parse_boolean
return json.loads(str.lower())
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Arik Fraimovich
@arikfr
Feb 09 2016 19:40
oh, right. it should be without spaces
CarpeFridiem
@brentonmallen1
Feb 09 2016 20:24
Seems like I'm now running into an issue with flask:
bin/run ./manage.py send_test_mail
[2016-02-09 20:22:49,267][PID:11421][WARNING][redash.query_runner] MQL query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-02-09 20:22:49,333][PID:11421][WARNING][redash.query_runner] TreasureData query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-02-09 20:22:49,333][PID:11421][WARNING][redash.query_runner] Oracle query runner enabled but not supported, not registering. Either disable or install missing dependencies.
Traceback (most recent call last):
File "/opt/redash/current/manage.py", line 58, in <module>
manager.run()
File "/usr/local/lib/python2.7/dist-packages/flaskscript/_init.py", line 405, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/flaskscript/_init.py", line 384, in handle
return handle(app, positional_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_script/commands.py", line 145, in handle
return self.run(
args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 386, in exit
self.auto_pop(exc_value)
File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 374, in auto_pop
self.pop(exc)
File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 341, in pop
self.app.do_teardown_request(exc)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1714, in do_teardown_request
rv = func(exc)
File "/opt/redash/redash.0.9.1.b1377/redash/metrics/request.py", line 39, in calculate_metrics_on_exception
calculate_metrics(MockResponse(500, '?', -1))
File "/opt/redash/redash.0.9.1.b1377/redash/metrics/request.py", line 17, in calculate_metrics
request_duration = (time.time() - g.start_time)
1000
File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 343, in getattr
return getattr(self._get_current_object(), name)
AttributeError: '_AppCtxGlobals' object has no attribute 'start_time'
Arik Fraimovich
@arikfr
Feb 09 2016 20:54
Sort of. You have some other error, but to see the real exception you need to patch /opt/redash/current/redash/metrics/request.py on line 17 (in calculate_metrics method) add the following lines:
if 'start_time' not in g:
    return response
it was fixed in #815 and part of the 0.9.2 release.
@brentonmallen1 ^
CarpeFridiem
@brentonmallen1
Feb 09 2016 21:10
ah i see
thank you
Josh Fyne
@jfyne
Feb 09 2016 21:12
hi all, im getting a TemplateNotFound login.html using docker compose and the redash/redash docker image
my docker-compose file has under environment:
REDASH_STATIC_ASSETS_PATH="/opt/redash/current/rd_ui/dist"
aha
REDASH_STATIC_ASSETS_PATH=/opt/redash/current/rd_ui/dist/ fixes it