|
From: | Hector Garcia de Marina |
Subject: | Re: [Paparazzi-devel] Reading messages in python from a replayed log |
Date: | Fri, 19 Aug 2016 13:54:35 +0200 |
Hi guys,I have the following problem and I do not know whether it has a straightforward solution.I am replaying a log, everything looks find (GCS, messages, real time plot, etc). I also havean agent written in python that works fine for simulation and real flights but not with replays.In particular, it complains about:Exception happened during processing of request from ('127.0.0.1', 50024)Traceback (most recent call last):File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread self.finish_request(request, client_address)File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__ self.handle()File "/usr/lib/python2.7/dist-packages/ivy/ivy.py", line 1268, in handle keep_connection_alive = self.process_ivymessage(msg, client)File "/usr/lib/python2.7/dist-packages/ivy/ivy.py", line 1334, in process_ivymessage self.server.handle_msg(client, num_id, *params)File "/usr/lib/python2.7/dist-packages/ivy/ivy.py", line 1088, in handle_msg return self._get_fct_for_subscription(int(idx))(client, *params) File "/home/noether/Workspace/paparazzi/sw/ext/pprzlink/lib/ v1.0/python/pprzlink/ivy.py", line 95, in <lambda> bind_id = IvyBindMsg(lambda agent, *larg: self.parse_pprz_msg(callback, larg[0]), regex)File "/home/noether/Workspace/paparazzi/sw/ext/pprzlink/lib/ v1.0/python/pprzlink/ivy.py", line 156, in parse_pprz_msg callback(ac_id, msg)UnboundLocalError: local variable 'ac_id' referenced before assignmentThis error is triggered byself.interface.subscribe(self.message_recv) ---> message_recv(self, ac_id, msg):The same error can be reproduced by replaying a log and trying to run the python versions of the agents Messages and RealTimePlot.It seems it is related with the following? the aircraft now it is "replay3" instead of "3" byinspecting the format of the messages?replay3 ATTITUDE 0.68112 -2.240519 0.333095instead of3 ATTITUDE xxx xxxCheers!--Héctor
[Prev in Thread] | Current Thread | [Next in Thread] |