Closed kjhazelwood closed 3 years ago
For v1.0.0, don't pass the ACNET connection to DPMContext
. It now takes an optional port value.
There are two API changes in v1.0.0. The DPM connection uses TCP sockets instead of an ACNET connection so we no longer pass the connection to DPMContext
. The other change is that the dpm
object isn't, itself, an async generator, so you have to call dpm.replies()
.
So:
async with DPMContext() as dpm:
# ... set up DPM connection ...
# Start data collection ...
async for reply in dpm.replies():
Not sure about the [17 -17] error. We'll look into it on Monday.
Is there any chance you have the logger on and know what DPM you connected to? We are investigating now.
@beauremus
2021-06-21 10:22:07 INFO: connected to ACSys with handle %43712
2021-06-21 10:22:07 INFO: using DPM task: DPMD@DPM07
2021-06-21 10:22:07 INFO: DPM returned list id 61771
This turned out to be a bug in how the username is resolved to a console_user_id in the control system database. A user who was in the settings database was removed from the Fermilab system recently, and when I resynced the settings database with the DPMs, it caused an issue with resolving the console_user_id from a user name.
Removing the user from the settings database is the quick fix. The long-term fix is to handle the exception of not finding the given user.
I had been using a acsys script to make settings with the role "testing" successfully for the last few days. Today when I try the same code I get a [17 -17] console class error when running
dpm.enable_settings(role="testing")
. I tried upgrading acsys from 0.11.4 to 1.0.0. Now I get the following stacktrace trying to connect to ACNET:I've downgraded to 0.11.4 but the [17 -17] persists.