When running db_maker.py with a fresh database, sqlalch runs into an issue of trying to access tables before theyre created.
Issue
`Traceback (most recent call last):
File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: halls
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
........
File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: halls
[SQL: SELECT halls.id AS halls_id, halls.property_id AS halls_property_id, halls.rent AS halls_rent
FROM halls]`
This is due to line 2 where app is imported, running app\__init__.py where in line 24 routes and models is imported unnecessarily, causing a headache with the forms.py code.
When running db_maker.py with a fresh database, sqlalch runs into an issue of trying to access tables before theyre created.
Issue
`Traceback (most recent call last): File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\default.py", line 920, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: no such table: halls
The above exception was the direct cause of the following exception:
Traceback (most recent call last): ........ File "C:\Users\tobyn\Documents\Side Projects\Rate-My-Student-Home\venv\Lib\site-packages\sqlalchemy\engine\default.py", line 920, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: halls [SQL: SELECT halls.id AS halls_id, halls.property_id AS halls_property_id, halls.rent AS halls_rent FROM halls]`
This is due to line 2 where
app
is imported, runningapp\__init__.py
where in line 24 routes and models is imported unnecessarily, causing a headache with the forms.py code.Solution
Remove unnecessary code in line 24 in init