sqlite3.OperationalError: too many SQL variables
See original GitHub issueI am using ivadomed (git-master-97b5772374660b12895f7a458941f468090e8bf8*)
I run into the above error when trying to train on the spine generic dataset. Don’t really know what’s causing that.
Traceback (most recent call last):
File "/home/etetteh/venv_ivadomed/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
cursor, statement, parameters, context
File "/home/etetteh/venv_ivadomed/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: too many SQL variables
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
"Too many SQL variables" error in django with sqlite3
I'm getting this error using sqlite3 in django: Exception Value: too many SQL variables. And I think the answer to it is this,...
Read more >"too many SQL variables" Error with pandas 0.23 ... - GitHub
Now I receive this error "OperationalError: (sqlite3.OperationalError) too many SQL variables". I am converting a dataframe with ~20k+ rows ...
Read more >'too many SQL variables' error with ModelMultipleChoiceField
Hello, I have a form with ModelMultipleChoiceField on it, and I am getting 'DatabaseError: too many SQL variables' (using SQLite) when the user...
Read more >SQlite3: too many SQL variables, Foreign Keys & Delete
%s, %s.... And so on (1180 total in my case) }}} Errors: {{{ django.db.utils.OperationalError: too ...
Read more >Too many SQL variables" error in django with sqlite3-django
There is no way to bypass this, it's an SQLITE limitation. Your query will run fine on MySQL however. But if you have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There would be one thing to fix in the config file in
contrast_params
. The contrasts in BIDS is always the last part of the filename after the last underscore, so “T1w_MTS” and “MTon_MTS” should be replaced by “MTS” only in:Other than that, everything looks fine.
I would suggest to fix the
contrast_params
and try the training again. However, I doubt that this is what is causing the issue with the pybids indexing here.If the training fails again, I would recommend trying locally on your computer just to see if you get the same error as in compute canada.
Okay, current theory on this is likely related to the SQLite database being built under BIDSLayout (a package we use) having a hard limit on SQLITE_MAX_COLUMN, as elaborated a bit here: https://stackoverflow.com/a/67673249. We will likely needs to check SQLite version and its limit and see if there is a way to recompile SQLite with higher limit to see if it gets around this issue. I just requested Compute Canada credential and will try to replicate the problems.
AFAIK, this is a lower library issue meaning we won’t be able to address it just by making code change on our side. More investigation will be required once I get my CC access.