Closed KonradIT closed 5 years ago
Happens on /settings save as well:
Calculating which threads should be excluded
[2019-06-05 20:15:06,553] ERROR in app: Exception on /settings [POST]
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: tweets_1.user_id
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python3.7/site-packages/semiphemeral/web.py", line 58, in edit_settings
twitter.calculate_excluded_threads()
File "/usr/lib/python3.7/site-packages/semiphemeral/twitter.py", line 212, in calculate_excluded_threads
.filter(Tweet.favorite_count >= self.common.settings.get('tweets_like_threshold')) \
File "/usr/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3167, in all
return list(self)
File "/usr/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3323, in __iter__
return self._execute_and_instances(context)
File "/usr/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3348, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/usr/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: tweets_1.user_id
[SQL: SELECT threads.id AS threads_id, threads.root_status_id AS threads_root_status_id, threads.should_exclude AS threads_should_exclude
FROM threads JOIN tweets AS tweets_1 ON threads.id = tweets_1.thread_id
WHERE tweets_1.user_id = ? AND tweets_1.is_deleted = ? AND tweets_1.is_retweet = ? AND tweets_1.retweet_count >= ? AND tweets_1.favorite_count >= ?]
[parameters: (2199716367, 0, 0, 5, 10)]
(Background on this error at: http://sqlalche.me/e/e3q8)
127.0.0.1 - - [05/Jun/2019 20:15:06] "POST /settings HTTP/1.1" 500 -
Strange I'm not reproducing. It looks like you're running this from the source tree instead of installing from pip. Are you using pipenv and having the dependencies installed, e.g. pipenv run python ./app.py fetch
instead of just ./app.py fetch
?
It was my browser configuration. Using Chrome fixed the issue.
When running
app.py fetch
I get the following error:Happens on both
pipenv run python ./app.py fetch
andsemiphemeral fetch