Redash: Python query runner cannot use "print" function in 9.0.0-alpha

Created on 11 Mar 2020  路  1Comment  路  Source: getredash/redash

Issue Summary

Python version: 3.7.6
Redash version: 9.0.0-a;pha
Python query runner cannot use "print" function in 9.0.0-alpha

Steps to Reproduce

  1. export REDASH_ENABLED_QUERY_RUNNERS=redash.query_runner.python
  2. Use python query runner
  3. print('x') and execute it

Screen Shot 2020-03-11 at 12 57 18

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

  • In previous version, if I call print, it will be put in the log section.

Screen Shot 2020-03-11 at 12 54 21

  • But in the current version, print will not work
    Screen Shot 2020-03-11 at 12 56 07

Technical details:

  • Redash Version: 9.0.0-a;pha
  • Browser/OS: default Docker
  • How did you install Redash: Docker
Backend Bug

Most helpful comment

Exactly the same issue when self-hosting.

We fixed it by updating the CustomPrint class in Python query runner.
Created a pull request for the same: https://github.com/getredash/redash/pull/4730

>All comments

Exactly the same issue when self-hosting.

We fixed it by updating the CustomPrint class in Python query runner.
Created a pull request for the same: https://github.com/getredash/redash/pull/4730

Was this page helpful?
0 / 5 - 0 ratings