Message409810
The app has to open a db connection during module initialization to trigger the problem, so I can't provide a self-contained way to reproduce the problem.
The closest I can come is the attached file, format_rules_annotated.py.
With lines 66-69 in place, the problem occurs, even if there are no command line arguments, with Python 3.10, but not with Python 3.9. If I comment out lines 66-69 there is no problem with either 3.10 or 3.9, even if I add a command line argument that causes connections to be opened within functions defined within the module. (I added the explicit initialization of the institution_names dict so I could test those function calls without accessing the db during module initialization.)
FWIW, here is an execution under 3.10 with lines 66-69 commented out:
$ python -m format_rules_annotated -r QCC01:QNS01:PH:35
QCC01:QNS01:PH:35
C- or above in PH 101 at Queensborough, 4.0 credits, transfers to Queens as PHYS-11 and PHYS-14, 4.0 credits.
[No "Exception ignored" message appears here because db was not accessed during module initialization]
$ |
|
Date |
User |
Action |
Args |
2022-01-05 23:11:47 | cvickery | set | recipients:
+ cvickery, piro, Dennis Sweeney |
2022-01-05 23:11:47 | cvickery | set | messageid: <1641424307.52.0.791048608753.issue46256@roundup.psfhosted.org> |
2022-01-05 23:11:47 | cvickery | link | issue46256 messages |
2022-01-05 23:11:47 | cvickery | create | |
|