peewee: too many sql variables #21

Closed
opened 5 months ago by René Wagner · 0 comments
Owner

indexing repeatedly fails with a peewee error about too many arguments (on different pages). After that, the sqlite3 db seems somewhat broken as serve fails as well with a similar error

indexing error:

Traceback (most recent call last):
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql
    cursor.execute(sql, params or ())
sqlite3.OperationalError: too many SQL variables
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/gus/gus/build_index.py", line 133, in main
    build_index(args.should_run_destructive, args.invalidation_window)
  File "/home/gus/gus/build_index.py", line 122, in build_index
    index_statistics = compute_index_statistics(db)
  File "/home/gus/gus/lib/index_statistics.py", line 24, in compute_index_statistics
    for d in domains_query:
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 6851, in __iter__
    self.execute()
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1898, in inner
    return method(self, database, *args, **kwargs)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1969, in execute
    return self._execute(database)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2141, in _execute
    cursor = database.execute(self)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3142, in execute
    return self.execute_sql(sql, params, commit=commit)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3136, in execute_sql
    self.commit()
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2902, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 185, in reraise
    raise value.with_traceback(tb)
  File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql
    cursor.execute(sql, params or ())
peewee.OperationalError: too many SQL variables

serve error:

 Traceback (most recent call last):
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql
     cursor.execute(sql, params or ())
 sqlite3.OperationalError: too many SQL variables
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   File "/home/gus/serve/__init__.py", line 1, in <module>
     from .views import app, gus
   File "/home/gus/serve/views.py", line 53, in <module>
     gus = GUS()
   File "/home/gus/serve/models.py", line 21, in __init__
     self.statistics = compute_index_statistics(self.db)
   File "/home/gus/gus/lib/index_statistics.py", line 24, in compute_index_statistics
     for d in domains_query:
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 6851, in __iter__
     self.execute()
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1898, in inner
     return method(self, database, *args, **kwargs)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1969, in execute
     return self._execute(database)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2141, in _execute
     cursor = database.execute(self)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3142, in execute
     return self.execute_sql(sql, params, commit=commit)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3136, in execute_sql
     self.commit()
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2902, in __exit__
     reraise(new_type, new_type(exc_value, *exc_args), traceback)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 185, in reraise
     raise value.with_traceback(tb)
   File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql
     cursor.execute(sql, params or ())
peewee.OperationalError: too many SQL variables

indexing repeatedly fails with a peewee error about too many arguments (on different pages). After that, the sqlite3 db seems somewhat broken as serve fails as well with a similar error indexing error: ``` Traceback (most recent call last): File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql cursor.execute(sql, params or ()) sqlite3.OperationalError: too many SQL variables During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/gus/gus/build_index.py", line 133, in main build_index(args.should_run_destructive, args.invalidation_window) File "/home/gus/gus/build_index.py", line 122, in build_index index_statistics = compute_index_statistics(db) File "/home/gus/gus/lib/index_statistics.py", line 24, in compute_index_statistics for d in domains_query: File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 6851, in __iter__ self.execute() File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1898, in inner return method(self, database, *args, **kwargs) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1969, in execute return self._execute(database) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2141, in _execute cursor = database.execute(self) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3142, in execute return self.execute_sql(sql, params, commit=commit) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3136, in execute_sql self.commit() File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2902, in __exit__ reraise(new_type, new_type(exc_value, *exc_args), traceback) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 185, in reraise raise value.with_traceback(tb) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: too many SQL variables ``` serve error: ``` Traceback (most recent call last): File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql cursor.execute(sql, params or ()) sqlite3.OperationalError: too many SQL variables During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/gus/serve/__init__.py", line 1, in <module> from .views import app, gus File "/home/gus/serve/views.py", line 53, in <module> gus = GUS() File "/home/gus/serve/models.py", line 21, in __init__ self.statistics = compute_index_statistics(self.db) File "/home/gus/gus/lib/index_statistics.py", line 24, in compute_index_statistics for d in domains_query: File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 6851, in __iter__ self.execute() File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1898, in inner return method(self, database, *args, **kwargs) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 1969, in execute return self._execute(database) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2141, in _execute cursor = database.execute(self) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3142, in execute return self.execute_sql(sql, params, commit=commit) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3136, in execute_sql self.commit() File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 2902, in __exit__ reraise(new_type, new_type(exc_value, *exc_args), traceback) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 185, in reraise raise value.with_traceback(tb) File "/home/gus/.cache/pypoetry/virtualenvs/gus-BXommJzs-py3.7/lib/python3.7/site-packages/peewee.py", line 3129, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: too many SQL variables ```
René Wagner added the
bug
label 5 months ago
René Wagner self-assigned this 5 months ago
René Wagner closed this issue 5 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.