From 2ad310b3c39abb19a9aa04674d9875296ec524eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Rothg=C3=A4nger?= Date: Mon, 21 Oct 2024 14:46:45 +0200 Subject: [PATCH] update first-app to be in line with current python api --- content/docs/getting-started/first-app.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/getting-started/first-app.md b/content/docs/getting-started/first-app.md index e4d8eeea..5cc4f39e 100644 --- a/content/docs/getting-started/first-app.md +++ b/content/docs/getting-started/first-app.md @@ -54,7 +54,7 @@ Now we need a subscriber, `z_subscriber.py` that can receive the measurements: import zenoh, time def listener(sample): - print(f"Received {sample.kind} ('{sample.key_expr}': '{sample.payload.deserialize(str)}')") + print(f"Received {sample.kind} ('{sample.key_expr}': '{sample.payload.to_string()}')") if __name__ == "__main__": session = zenoh.open(zenoh.Config()) @@ -119,10 +119,10 @@ if __name__ == "__main__": for reply in replies: try: print("Received ('{}': '{}')" - .format(reply.ok.key_expr, reply.ok.payload.deserialize(str))) + .format(reply.ok.key_expr, reply.ok.payload.to_string())) except: print("Received (ERROR: '{}')" - .format(reply.err.payload.decode(str))) + .format(reply.err.payload.to_string())) session.close() ```