[IPython-User] IPython TaskClient map(): UnpickleableError???
Sun Sep 26 20:24:28 CDT 2010
That was a whole *week* ago! I've completely forgotten what state the code was in then! ;-)
(Mailing list server hiccups. Gotta love 'em.)
IIRC, it might have been some issue with dealing with namedtuple objects from the newly exposed collections thingy.
I've move away from those to a dict-based implementation, and that sidestepped the error enough for me to realise that that
my imports into the engine collection wasn't correct. After a bit of to-ing and fro-ing the code is now at the
point where we're seeing the MEC/TC issues discussed in another thread.
Hopefully this will serve as a notice to anyone else Googling such an issue to take a deep breath, step back, and
think about what's actually on the engines, rather than chasing a semi-spurious error message from
within the bowels of Twisted...
(It might be worthwhile to setup some testing around namedtuples being pickled/unpickled via IPython's MEC/TC APIs, however.
Just because I sidestepped my issue doesn't necessarily mean that one doesn't exist! )
On 27/09/2010, at 8:14 AM, Fernando Perez wrote:
> Hi Frank,
> for some reason this email only showed up today on the list... I saw
> similar behavior on some other scipy.org-hosted lists, so their server
> seems to have had a strange hiccup.
> On Mon, Sep 20, 2010 at 4:20 AM, Frank Horowitz
> <email@example.com> wrote:
>> Hi All,
>> I'm trying to jam some moderately complicated data structures down the wire to the collection of engines, but am seeing the following error crop up:
>> UnpickleableError: Cannot pickle <type 'str'> objects
>> This is in response to a TaskClient instance's map() being called on a function with a single (tuple) argument where the sequence is being fed from a list.
>> I've done the obvious, and tried pickle and cPickle directly on strings, and those *do* work --- much as you'd expect. I suspect this is something within the guts of Twisted...
>> Any clues as to what might be causing this and/or how to avoid it?
> That's a very, very odd error. Do you know what's in the specific
> string that is throwing this exception? The most depressing part is
> that if I google for your error message in quotes (to ensure I don't
> get other unpckle error hits), the *only* hit from google is this very
> thread! It's always a bad sign when the entire google index only
> returns your own questions back, and it's pretty rare to see a
> *single* hit query these days:
> 1 result (0.26 seconds)
> Search Results
> IPython TaskClient map(): UnpickleableError???
> Sep 20, 2010 ... IPython TaskClient map(): UnpickleableError?
> ... seeing the following error crop up: UnpickleableError: Cannot
> pickle <type 'str'> objects ...
> permalink.gmane.org/gmane.comp.python.ipython.user/5294 - Cached
> If you can isolate the string causing the traceback, or provide a
> self-contained small test to reproduce the problem, we might be able
> to track down who inside twisted is causing this. It's also possible
> (and I'd venture to say even likely) that the real error is something
> else, and Twisted may be re-raising the wrong exception.
More information about the IPython-User