mistercrunch closed pull request #4804: [upload csv to hive] fix call to unicodereader.next() URL: https://github.com/apache/incubator-superset/pull/4804
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py index 85ff9dbb80..d239f899a8 100644 --- a/superset/db_engine_specs.py +++ b/superset/db_engine_specs.py @@ -869,7 +869,7 @@ def create_table_from_csv(form, table): """Uploads a csv file and creates a superset datasource in Hive.""" def get_column_names(filepath): with open(filepath, 'rb') as f: - return unicodecsv.reader(f, encoding='utf-8-sig').next() + return next(unicodecsv.reader(f, encoding='utf-8-sig')) table_name = form.name.data filename = form.csv_file.data.filename ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services