[Tutor] Pickling debugging question

Jonathan Hayward http://JonathansCorner.com jonathan.hayward at pobox.com
Thu Aug 21 17:22:02 EDT 2003


I am trying to save a monolith consisting of classes I wrote, all 
boiling down to primitive objects. I get this error:

Traceback (most recent call last):
  File "/home/jonathan/dm/datamined", line 1889, in keep_saving_monolith
    save_object(monolith, "monolith")
  File "/home/jonathan/dm/datamined", line 1935, in save_object
    cPickle.dump(object, filehandle)
  File "/usr/lib/python2.2/copy_reg.py", line 57, in _reduce
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects

Could this mean that I typed:

    self.field = function

instead of

    self.field = function()

What are the probable culprits for this type of error?

-- 
++ Jonathan Hayward, jonathan.hayward at pobox.com
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com





More information about the Tutor mailing list