sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "other_aves.line" does not exist LINE 2: FROM other_aves.line ^ [SQL: SELECT count(%(count_2)s) AS count_1 FROM other_aves.line] [parameters: {'count_2': '*'}] (Background on this error at: https://sqlalche.me/e/20/f405)
_exec_single_context
context,
):
evt_handled = True
break
if not evt_handled:
self.dialect.do_execute( ^
cursor, str_statement, effective_parameters, context
)
if self._has_events or self.engine._has_events:
self.dispatch.after_cursor_execute(
do_execute
def do_executemany(self, cursor, statement, parameters, context=None):
cursor.executemany(statement, parameters)
def do_execute(self, cursor, statement, parameters, context=None):
cursor.execute(statement, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
def do_execute_no_params(self, cursor, statement, context=None):
cursor.execute(statement)
def is_disconnect(self, e, connection, cursor):
__call__
def __call__(self, environ: dict, start_response: t.Callable) -> t.Any:
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app`, which can be
wrapped to apply middleware.
"""
return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^
except: # noqa: B001
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
wsgi_app
ctx = self.request_context(environ)
error: t.Optional[BaseException] = None
try:
try:
ctx.push()
response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
full_dispatch_request
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return self.finalize_request(rv)
def finalize_request(
self,
rv: t.Union[ft.ResponseReturnValue, HTTPException],
full_dispatch_request
try:
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
dispatch_request
and req.method == "OPTIONS"
):
return self.make_default_options_response()
# otherwise dispatch to the handler for that endpoint
view_args: t.Dict[str, t.Any] = req.view_args # type: ignore[assignment]
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
def full_dispatch_request(self) -> Response:
"""Dispatches the request and on top of that performs request
pre and postprocessing as well as HTTP exception catching and
error handling.
inner
# Check if administrative piece is accessible
abort = self._handle_view(f.__name__, **kwargs)
if abort is not None:
return abort
return self._run_view(f, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
inner._wrapped = True
return inner
_run_view
View function
:param kwargs:
Arguments
"""
try:
return fn(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^
except TypeError:
return fn(cls=self, **kwargs)
def inaccessible_callback(self, name, **kwargs):
"""
index_view
# Get page size
page_size = view_args.page_size or self.page_size
# Get count and data
count, data = self.get_list(view_args.page, sort_column, view_args.sort_desc, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
view_args.search, view_args.filters, page_size=page_size)
list_forms = {}
if self.column_editable_list:
for row in data:
get_list
joins,
count_joins,
filters)
# Calculate number of rows if necessary
count = count_query.scalar() if count_query else None ^^^^^^^^^^^^^^^^^^^^
# Auto join
for j in self._auto_joins:
query = query.options(joinedload(j))
scalar
:meth:`_engine.Result.scalar` - v2 comparable method.
"""
# TODO: not sure why we can't use result.scalar() here
try:
ret = self.one() ^^^^^^^^^^
if not isinstance(ret, collections_abc.Sequence):
return ret
return ret[0]
except sa_exc.NoResultFound:
return None
one
:meth:`_engine.Result.one` - v2 comparable method.
:meth:`_engine.Result.scalar_one` - v2 comparable method.
"""
return self._iter().one() # type: ignore ^^^^^^^^^^^^
def scalar(self) -> Any:
"""Return the first element of the first result or None
if no rows present. If multiple rows are returned,
raises MultipleResultsFound.
_iter
def _iter(self) -> Union[ScalarResult[_T], Result[_T]]:
# new style execution.
params = self._params
statement = self._statement_20()
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
statement,
params,
execution_options={"_sa_orm_load_options": self.load_options},
)
execute
:return: a :class:`_engine.Result` object.
"""
return self._execute_internal(
statement,
params,
execution_options=execution_options,
bind_arguments=bind_arguments,
_parent_execute_state=_parent_execute_state,
_execute_internal
return conn.scalar(
statement, params or {}, execution_options=execution_options
)
if compile_state_cls:
result: Result[Any] = compile_state_cls.orm_execute_statement(
self,
statement,
params or {},
execution_options,
bind_arguments,
orm_execute_statement
params,
execution_options,
bind_arguments,
conn,
) -> Result:
result = conn.execute(
statement, params or {}, execution_options=execution_options
)
return cls.orm_setup_cursor_result(
session,
statement,
execute
try:
meth = statement._execute_on_connection
except AttributeError as err:
raise exc.ObjectNotExecutableError(statement) from err
else:
return meth(
self,
distilled_parameters,
execution_options or NO_OPTIONS,
)
_execute_on_connection
execution_options: CoreExecuteOptionsParameter,
) -> Result[Any]:
if self.supports_execution:
if TYPE_CHECKING:
assert isinstance(self, Executable)
return connection._execute_clauseelement(
self, distilled_params, execution_options
)
else:
raise exc.ObjectNotExecutableError(self)
_execute_clauseelement
column_keys=keys,
for_executemany=for_executemany,
schema_translate_map=schema_translate_map,
linting=self.dialect.compiler_linting | compiler.WARN_LINTING,
)
ret = self._execute_context(
dialect,
dialect.execution_ctx_cls._init_compiled,
compiled_sql,
distilled_parameters,
execution_options,
_execute_context
return self._exec_insertmany_context(
dialect,
context,
)
else:
return self._exec_single_context(
dialect, context, statement, parameters
)
def _exec_single_context(
self,
_exec_single_context
context.post_exec()
result = context._setup_result_proxy()
except BaseException as e:
self._handle_dbapi_exception( ^
e, str_statement, effective_parameters, cursor, context
)
return result
_handle_dbapi_exception
if newraise:
raise newraise.with_traceback(exc_info[2]) from e
elif should_wrap:
assert sqlalchemy_exception is not None
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
else:
assert exc_info[1] is not None
raise exc_info[1].with_traceback(exc_info[2])
finally:
del self._reentrant_error
_exec_single_context
context,
):
evt_handled = True
break
if not evt_handled:
self.dialect.do_execute( ^
cursor, str_statement, effective_parameters, context
)
if self._has_events or self.engine._has_events:
self.dispatch.after_cursor_execute(
do_execute
def do_executemany(self, cursor, statement, parameters, context=None):
cursor.executemany(statement, parameters)
def do_execute(self, cursor, statement, parameters, context=None):
cursor.execute(statement, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
def do_execute_no_params(self, cursor, statement, context=None):
cursor.execute(statement)
def is_disconnect(self, e, connection, cursor):
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "other_aves.line" does not exist LINE 2: FROM other_aves.line ^ [SQL: SELECT count(%(count_2)s) AS count_1 FROM other_aves.line] [parameters: {'count_2': '*'}] (Background on this error at: https://sqlalche.me/e/20/f405)
This is the Copy/Paste friendly version of the traceback.
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.