nanoporetech / minknow_api

Protobuf and gRPC specifications for the MinKNOW API
Other
55 stars 12 forks source link

Messages with a `%' sign fail to send #25

Closed alexomics closed 3 years ago

alexomics commented 3 years ago

Unescaped percentage signs (%) don't seem to be receivable by the MinKNOW API. We can send them without error but they don't appear in the UI, so some kind of silent failure?

from minknow_api.manager import Manager

m = Manager(host="localhost", port=9501, use_tls=False)
for pos in m.flow_cell_positions():
    print(f"Connecting to {pos.name}")
    conn = pos.connect()
    break

incoming_msgs = conn.log.get_user_messages()

for send in ["Hello, World!", "A \%", "B 100%", "C 100\%"]:
    resp = conn.log.send_user_message(severity=1, user_message=send)

for recv in incoming_msgs:
    print(recv)

Output:

time {
  seconds: 1625064325
  nanos: 677229000
}
severity: MESSAGE_SEVERITY_INFO
identifier: "script_user_info"
user_message: "Hello, World!"

time {
  seconds: 1625064325
  nanos: 677472000
}
severity: MESSAGE_SEVERITY_INFO
identifier: "script_user_info"
user_message: "A %"

time {
  seconds: 1625064325
  nanos: 677860000
}
severity: MESSAGE_SEVERITY_INFO
identifier: "script_user_info"
user_message: "C 100%"

System details:

MinKNOW: 21.05.8
minknow-core-gridion: 4.3.4
minknow-api: 4.2.4
python: 3.7.10
0x55555555 commented 3 years ago

Hi Alex,

We have had this reported internally recently as a bug - fix will roll out in the next release.

Thanks,

alexomics commented 3 years ago

Perfect, thanks for the quick reply!