Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlalchemy.exc.OperationalError: too many SQL variables while runnig "superset load_examples" #7398

Open
archer-blackcat opened this issue Apr 28, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@archer-blackcat
Copy link

commented Apr 28, 2019

I was following the installation steps:

  1. create-admin
    2)db upgrade
  2. load_examples

Expected results

However,when i try to load the examples,the following error occured:

Actual results

superset) C:\Users\Tetrarrow\Anaconda3\envs\superset\Lib\site-packages\superset\bin>python superset load_examples
Loading examples into
Creating default CSS templates
Loading energy related dataset
Creating table [wb_health_population] reference
2019-04-28 11:37:08,090:INFO:root:Creating database reference
2019-04-28 11:37:08,144:INFO:root:Database.get_sqla_engine(). Masked URL: sqlite:///C:\Users\Tetrarrow.superset\superset.db
Loading [World Bank's Health Nutrition and Population Stats]
Traceback (most recent call last):
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: too many SQL variables

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "superset", line 15, in
cli()
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\flask\cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\flask\cli.py", line 257, in decorator
return _ctx.invoke(f, *args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\superset\cli.py", line 193, in load_examples
load_examples_run(load_test_data)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\superset\cli.py", line 146, in load_examples_run
data.load_world_bank_health_n_pop()
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\superset\data_init
.py", line 180, in load_world_bank_health_n_pop
index=False)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\pandas\core\generic.py", line 2127, in to_sql
dtype=dtype)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\pandas\io\sql.py", line 450, in to_sql
chunksize=chunksize, dtype=dtype)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\pandas\io\sql.py", line 1149, in to_sql
table.insert(chunksize)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\pandas\io\sql.py", line 663, in insert
self._execute_insert(conn, keys, chunk_iter)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\pandas\io\sql.py", line 638, in _execute_insert
conn.execute(*self.insert_statement(data, conn))
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 988, in execute
return meth(self, multiparams, params)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\sql\elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 1107, in _execute_clauseelement
distilled_params,
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\util\compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\util\compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "C:\Users\Tetrarrow\Anaconda3\envs\superset\lib\site-packages\sqlalchemy\engine\default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) too many SQL variables:
[SQL: INSERT INTO wb_health_population ("NY_GNP_PCAP_CD", "SE_ADT_1524_LT_FM_ZS", "SE_ADT_1524_LT_MA_ZS", "SE_ADT_1524_LT_ZS", "SE_ADT_LITR_FE_ZS", "SE_ADT_LITR_MA_ZS", "SE_ADT_LITR_ZS", "SE_ENR_ORPH", "SE_PRM_CMPT_FE_ZS", "SE_PRM_CMPT_MA_ZS", "SE_PRM_CMPT_ZS", "SE_PRM_ENRR", "SE_PRM_ENRR_FE", "SE_PRM_ENRR_MA", "SE_PRM_NENR", "SE_PRM_NENR_FE", "SE_PRM_NENR_MA", "SE_SEC_ENRR", "SE_SEC_ENRR_FE", "SE_SEC_ENRR_MA", "SE_SEC_NENR", "SE_SEC_NENR_FE", "SE_SEC_NENR_MA", "SE_TER_ENRR", "SE_TER_ENRR_FE", "SE_XPD_TOTL_GD_ZS", "SH_ANM_CHLD_ZS", "SH_ANM_NPRG_ZS", "SH_CON_1524_FE_ZS", "SH_CON_1524_MA_ZS", "SH_CON_AIDS_FE_ZS", "SH_CON_AIDS_MA_ZS", "SH_DTH_COMM_ZS", "SH_DTH_IMRT", "SH_DTH_INJR_ZS", "SH_DTH_MORT", "SH_DTH_NCOM_ZS", "SH_DTH_NMRT", "SH_DYN_AIDS", "SH_DYN_AIDS_DH", "SH_DYN_AIDS_FE_ZS", "SH_DYN_AIDS_ZS", "SH_DYN_MORT", "SH_DYN_MORT_FE", "SH_DYN_MORT_MA", "SH_DYN_NMRT", "SH_FPL_SATI_ZS", "SH_H2O_SAFE_RU_ZS", "SH_H2O_SAFE_UR_ZS", "SH_H2O_SAFE_ZS", "SH_HIV_0014", "SH_HIV_1524_FE_ZS", "SH_HIV_1524_KW_FE_ZS", "SH_HIV_1524_KW_MA_ZS", "SH_HIV_1524_MA_ZS", "SH_HIV_ARTC_ZS", "SH_HIV_KNOW_FE_ZS", "SH_HIV_KNOW_MA_ZS", "SH_HIV_ORPH", "SH_HIV_TOT............(the rest are just database data)

Environment

I pip install -r requirement.txt from the latest repo, and my sqlalchemy==1.2

if i skip the loading example step, i can correctly log in to superset,just without the data.

can anyone help?

@issue-label-bot

This comment has been minimized.

Copy link

commented Apr 28, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.79. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the #bug label Apr 28, 2019

@villebro

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2019

What db is this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.