When selecting rows from my sqlite database with Flask / sqlAlchemy with this function:
Restaurants.index.in_(filtered_res_ids))).fetchall())
I gt the results that I want when testing within pycharm. However, when deploying it to my AWS elastic beanstalk it gives me problems.
Here's some of my error log:
[Mon Dec 23 18:23:28.956847 2019] [:error] [pid 3451] WHERE restaurants_image_price_english."index" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ... )
[2019-12-23 18:23:28,958] ERROR in app: Exception on /restaurantDiscover [POST]
Traceback (most recent call last):
File "/opt/python/run/venv/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/opt/python/run/venv/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: too many SQL variables
Should I use a different implementation?