-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
enhancementIndicates new improvementsIndicates new improvements
Description
Bug Report
Description
Datajoint connection cannot be defined with the python with, and using with is the regular way to make sure a connection is closed after dj.conn().
Reproducibility
Include:
- OS (Linux)
- Python Version 3.9
- MySQL Version 8.0
- MySQL Deployment Strategy (remote)
- DataJoint Version 0.14.0
- Minimum number of steps to reliably reproduce the issue
with dj.conn(**conn_info) as connection:
print(connection)
- Complete error stack as a result of evaluating the above steps
Traceback (most recent call last):
File , in <module>
app.lambda_handler(payload.EVENT, payload.CONTEXT)
File , line 136, in lambda_handler
with dj.conn(**conn_info):
AttributeError: __enter__
Expected Behavior
Using with to create a datajoint db connection, and close the connection at the end of the with clause.
Metadata
Metadata
Assignees
Labels
enhancementIndicates new improvementsIndicates new improvements