After running code from my previous question, I get a result set from my subprocess that looks like this:
[[(<PyTime:6/10/2012 3:24:17 AM>, 1593.5, 413.0, 19.600000381469727, 430.0, 16.0, 47.0, 42.70000076293945, 15.600000381469727, 69.5),
(<PyTime:6/10/2012 3:24:18 AM>, 1658.0, 412.0, 19.600000381469727, 429.0, 7.0, 34.400001525878906, 30.899999618530273, 15.699999809265137, 69.5),
(<PyTime:6/10/2012 3:24:19 AM>, 1685.0, 406.0, 19.600000381469727, 425.0, 18.0, 28.700000762939453, 26.399999618530273, 15.699999809265137, 69.5)]]
When I attempt to send this from my subprocess to my parent process, I do this, where cu equals the above.
conn.send(pickle.dumps(cu))
This results in the following error: TypeError: can't pickle time objects
What is a work around to send the above list back to the parent process?
As the other answers said,
PyTimeobjects aren’t “pickleable”. I would suggest converting them to regulardatetimeobjects, which can be pickle: