epics-base / p4p

Python bindings for the PVAccess network client and server.
BSD 3-Clause "New" or "Revised" License
27 stars 38 forks source link

Error log when getting stats #110

Open jacomago opened 1 year ago

jacomago commented 1 year ago
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: ERROR:p4p.gw:Error during periodic sweep
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: Traceback (most recent call last):
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: File "/opt/conda/envs/pva-gateway/lib/python3.7/site-packages/p4p/gw.py", line 723, in run
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: self.stats.update_stats(period)
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: File "/opt/conda/envs/pva-gateway/lib/python3.7/site-packages/p4p/gw.py", line 328, in update_stats
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: C.executemany('INSERT INTO ds VALUES (?,?,?,?,?,?,?,?)', _gw.Server_report(server, norm))
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: File "_gw.pyx", line 319, in p4p._gw.Server_report
jun 28 13:25:37 idmz-ro-epics-gw-tn.esss.lu.se pvagw[1019]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 10: invalid continuation byte

From release 4.1.7

I'm guessing a pvAccess Server is providing weird credentials details.

mdavidsaver commented 1 year ago

https://github.com/mdavidsaver/p4p/blob/739b6eeef938f1eb889f243e4d898f1d7ae24677/src/p4p/_gw.pyx#L319

I'm guessing a pvAccess Server is providing weird credentials details.

Does ESS assign user names with an encoding other than utf-8?

At the least, a better error message is called for. eg. with the peer name.