Closed severinbeauvais closed 2 years ago
@ozamani9 @ozamani9gh FYI
Eve did some work in this area, connect with her to see what the result of that was.
captured the error log:
2022-08-09 16:58:18,256 - colin_api - ERROR in app:app.py:1455 - log_exception: Exception on /api/v1/corporations/0702216 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedColumn: column " " does not exist
LINE 1: ... THEN cp.first_nme || " "||cp.mi...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/app-root/src/colin_api/resources/v1/corporations.py", line 55, in request_colin
incorp_info_dict, incorp_directors_obj = Methods.init_info(incorp_info_sql, incorp_directors_sql)
File "/opt/app-root/src/colin_api/resources/v1/corporations.py", line 189, in init_info
incorp_directors_obj = db.engine.execute(incorp_directors_sql)
File "<string>", line 2, in execute
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 402, in warned
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3176, in execute
return connection.execute(statement, *multiparams, **params)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1291, in execute
return self._exec_driver_sql(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1595, in _exec_driver_sql
ret = self._execute_context(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1862, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2043, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column " " does not exist
LINE 1: ... THEN cp.first_nme || " "||cp.mi...
^
[SQL: select CASE WHEN cp.middle_nme IS NOT NULL THEN cp.first_nme || " "||cp.middle_nme|| " "||cp.last_nme ELSE cp.first_nme || " " || cp.last_nme END director_name from bc_registries.corp_party_vw cp where cp.corp_num = '0702216' and cp.end_event_id IS NULL and cp.party_typ_cd = "DIR";]
(Background on this error at: https://sqlalche.me/e/14/f405)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.10/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
resp = make_response(f(*args, **kwargs))
File "/usr/local/lib/python3.10/site-packages/flask_jwt_oidc/jwt_manager.py", line 272, in decorated
return f(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/flask_jwt_oidc/jwt_manager.py", line 224, in wrapper
return f(*args, **kwargs)
File "/opt/app-root/src/colin_api/resources/v1/corporations.py", line 70, in request_colin
except exc.SQLAlchemyError as err: # pylint: disable=undefined-variable # noqa: F821
NameError: name 'exc' is not defined
The bug has been fixed and deployed to DEV.
@riyazuddinsyed Please help to verify this ticket, thanks
@pwei1018 ready for release
I have an existing BEN company that I want to rename using a NR.