You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a freshly built docker container (built 2023-03-27) when trying to run on-call-user-sync to sync LDAP users the following error is encountered
AttributeError: 'Engine' object has no attribute 'execute'
Full error:
# env/bin/oncall-user-sync /home/oncall/config/config.yaml
2023-03-27 21:55:18,341 INFO oncall.metrics Loaded metrics handler dummy
2023-03-27 21:55:18,341 INFO oncall.metrics Loaded metrics handler dummy
2023-03-27 21:55:18,342 INFO root Starting user sync loop at 1679954118.3424478
2023-03-27 21:55:18,342 INFO root Starting user sync loop at 1679954118.3424478
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 908, in gevent._gevent_cgreenlet.Greenlet.run
File "/home/oncall/env/lib/python3.8/site-packages/oncall/user_sync/ldap_sync.py", line 446, in main
sync(config, engine)
File "/home/oncall/env/lib/python3.8/site-packages/oncall/user_sync/ldap_sync.py", line 299, in sync
forrowin engine.execute(users_query):
AttributeError: 'Engine' object has no attribute 'execute'
2023-03-27T21:55:18Z <Greenlet at 0x7f40f8e47360: main({'server': {'host': 'localhost', 'port': 8080}, 'd)> failed with AttributeError
From research it turns out that this is due to a breaking change in SQLAlchemy v2.
I have managed to resolve this by pinning SQLAlchemy to less than 2.0.0 in setup.py
sqlalchemy<2.0.0
Thought it was worth brining to your attention so you can pin it in the repo, or updating the sync script to work with the newer version of SQLAlchemy
The text was updated successfully, but these errors were encountered:
BillyAB
changed the title
LDAP Sync "oncall-user-sync"
LDAP Sync "oncall-user-sync" AttributeError: 'Engine' object has no attribute 'execute'
Mar 27, 2023
With a freshly built docker container (built 2023-03-27) when trying to run on-call-user-sync to sync LDAP users the following error is encountered
AttributeError: 'Engine' object has no attribute 'execute'
Full error:
From research it turns out that this is due to a breaking change in SQLAlchemy v2.
I have managed to resolve this by pinning SQLAlchemy to less than 2.0.0 in
setup.py
sqlalchemy<2.0.0
Thought it was worth brining to your attention so you can pin it in the repo, or updating the sync script to work with the newer version of SQLAlchemy
The text was updated successfully, but these errors were encountered: