Incubator-superset: with python 3.7.0 -- core.py line 2358 invalid syntax error

Created on 29 Jun 2018  路  3Comments  路  Source: apache/incubator-superset

  • [ x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [ x] I have reproduced the issue with at least the latest released version of superset
  • [ x] I have checked the issue tracker for the same issue and I haven't found one similar

Trying to install superset on Windows, installed the latest Python 3.7.0 which is released on 6/27/18; pip install superset with the latest version.
Run script
'fabmanager create-admin -app superset'
Fill in the required information for admin user, first name, last name, email, password, and confirmation of password

Superset version

Latest as 'pip install superset' was run on 6/28/18

Expected results

admin user created successfully

Actual results

Get an error: 'Was unable to import superset Error: invalid syntax (core.py, line 2358)'

Steps to reproduce

See above. Basically run 'superset db upgrade' will have similar error.

Did a bit digging, it seems that starting in Python 3.7.0, 'async' and 'await' become keyword. And core.py line 2358 is defining a var named 'async' --
async = request.form.get('runAsync') == 'true'

good first issue help-wanted starter-task

Most helpful comment

Ran into the same issue, tried to build from source and kept getting an error. Looks like async as a variable name was reintroduced later:
https://github.com/apache/incubator-superset/commit/7fcc2af68f79a8a78e1799feb80647ae90ac9370

It's currently in:
superset/db_engine_specs.py
superset/sql_lab.py
tests/celery_tests.py

All 3 comments

Issue resolved with code change #5320.

Ran into the same issue, tried to build from source and kept getting an error. Looks like async as a variable name was reintroduced later:
https://github.com/apache/incubator-superset/commit/7fcc2af68f79a8a78e1799feb80647ae90ac9370

It's currently in:
superset/db_engine_specs.py
superset/sql_lab.py
tests/celery_tests.py

Changes on db_engine_spac.py and sql_lab.py resolve the problem with python 3.7

Was this page helpful?
0 / 5 - 0 ratings