Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu update from 16.04 to 20.04 causes python 3.x package dependencies/requirements to break #129

Open
jdelp opened this issue Jan 9, 2022 · 0 comments

Comments

@jdelp
Copy link

jdelp commented Jan 9, 2022

The update from Ubuntu LTS 16.04 to 18.04 and 20.04 requires updates to Python 3 and pip3, which in turn requires updates to Lonoa's required packages. Updating to the latest package dependency versions causes Lonoa to run with errors such as the one detailed below. It is suspected that the two broken packages are pyscopg2 and sqlalchemy and they are no longer working due to code deprecations. Package updates were already made on the production csbcd01 server.

Updates to Lonoa's requirements.txt and refractoring of code to meet the requirements of the new package versions is in progress.

12/27/2021 09:14:42 PM log_failure_to_connect_to_database
Traceback (most recent call last):
File "api_webctrl.py", line 220, in
insert_readings_into_database(conn, readings, sensor)
File "api_webctrl.py", line 178, in insert_readings_into_database
conn.query(orm_webctrl.Reading.log_id).
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3265, in update
upd = sql.update(*self._raw_columns)
File "", line 2, in update
File "", line 2, in init
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
return fn(*args, **kwargs)
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/dml.py", line 1274, in init
super(Update, self).init(table, values, prefixes)
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/dml.py", line 509, in init
self.table = coercions.expect(
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py", line 211, in expect
return impl._implicit_coercions(
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py", line 254, in _implicit_coercions
self._raise_for_expected(element, argname, resolved)
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py", line 436, in _raise_for_expected
return super(_SelectIsNotFrom, self).raise_for_expected(
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py", line 282, in raise_for_expected
util.raise
(exc.ArgumentError(msg, code=code), replace_context=err)
File "/home/lonoa/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise

raise exception
sqlalchemy.exc.ArgumentError: subject table for an INSERT, UPDATE or DELETE expected, got Column('log_id', Integer(), ForeignKey('error_log.log_id'), table=).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant