GSOC Day 15 – Orders Make Some Progress

After speaking with Mithro last night, I was able to fix some of the problems with the orders panel. I replaced the code that I had been stuck on successfully, eventually getting the order to be sent properly to the server after some fiddling.

However, the code had more problems in store for me. When the client tried to receive the new order to add it to its list, it crashed. The bug was deep in the libtpproto-py code, which is rather rare – usually it’s been fully fixed already. In this case, however, the libtpproto-py code was calling a constructor with the wrong arguments (likely code that had been skipped when updating libtpproto-py).

After fixing that, another error appeared. Now I could receive orders that already existed, but adding an order would still give the following message:

Traceback (most recent call last):
File “libtpclient-py/tp/client/”, line 483, in OnCacheDirty
self.application.Post(apply(self.connection, evt, self.application.cache))
File “libtpclient-py/tp/client/”, line 805, in apply
if failed(connection.insert_order(, slot, evt.change.PendingOrder)):
File “libtpproto-py/tp/netlib/”, line 893, in insert_order
return self._okfail(
File “libtpproto-py/tp/netlib/”, line 288, in _okfail
raise IOError(“Bad Packet was received”)
IOError: Bad Packet was received

It seems the response to sending an order to the server has changed – it no longer sends an “OK” or “Fail” packet, instead sending the order back. I’m not sure how to fix this code yet, but I’ll work on it more tomorrow. Still, orders are now sent and received properly, and the panel displays them. So it’s a step in the right direction.


~ by greywhind on June 7, 2009.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: