Skip to content

Commit cfe25c3

Browse files
committed
fix ml handler bug
1 parent bd9b81f commit cfe25c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/aries-fl/hospital/hospital.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ def _register_agent_listeners(self):
6868
def _ml_messages_handler(self, payload):
6969

7070
connection_id = payload["connection_id"]
71+
content = payload["content"]
7172
print(f"ML Message from {connection_id}")
7273

7374
if connection_id in self.trusted_connection_ids:
7475
print("Open file")
7576
try:
7677
f = open("untrained_model.pt", "wb+")
7778
# self.log(bytes.fromhex(message["content"]))
78-
byte_message = bytes.fromhex(payload["content"])
79+
byte_message = bytes.fromhex(content)
7980
f.write(byte_message)
8081
f.close()
8182

0 commit comments

Comments
 (0)