Sure I can send a whole error, for reference I have since posting the original question managed to switch the database to MySQL but I am still getting errors that look mostly the same. Here is one in it's entirety:
2021-01-30 14:22:31,233: Exception on /m/550 [GET]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/movieelo/cinelow/my_server/people_movies/routes.py", line 22, in moviePage
pmf.add_movie(movie_id)
File "/home/movieelo/cinelow/my_server/database/pers_movie_dbf.py", line 31, in add_movie
cate.movies.append(a)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 282, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 710, in get
value = self.callable_(state, passive)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 729, in _load_for_state
return self._emit_lazyload(
File "<string>", line 1, in <lambda>
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 848, in _emit_lazyload
lazy_clause, params = self._generate_lazy_clause(state, passive)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 650, in _generate_lazy_clause
value = mapper._get_state_attr_by_column(
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/mapper.py", line 2795, in _get_state_attr_by_column
return state.manager[prop.key].impl.get(state, dict_, passive=passive)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 705, in get
value = state._load_expired(state, passive)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/state.py", line 660, in _load_expired
self.manager.deferred_scalar_loader(self, toload)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 985, in load_scalar_attributes
raise orm_exc.ObjectDeletedError(state)
sqlalchemy.orm.exc.ObjectDeletedError: Instance '<Category at 0x7fea857543d0>' has been deleted, or its row is otherwise not present.
2021-01-30 14:27:16,434: Exception on /m/550 [GET]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
self.dialect.do_execute(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python3.8/site-packages/mysql/connector/cursor.py", line 569, in execute
self._handle_result(self._connection.cmd_query(stmt))
File "/usr/lib/python3.8/site-packages/mysql/connector/connection.py", line 590, in cmd_query
result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
File "/usr/lib/python3.8/site-packages/mysql/connector/connection.py", line 478, in _handle_result
raise errors.get_exception(packet)
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PARTITION BY movie_category_scores.category_id ORDER BY movie_category_scores.s' at line 2
**NO MATCH**
I agree that it seems like SQLAlchemy is generating invalid SQL, but as mentioned before it was working perfectly when running on my own computer, so I am a little bit dumbfounded. Could it have anything to do with the fact that I was running Flask-SQLAlchemy?