durusmail: durus-users: Pickle error - pytz
Pickle error - pytz
2005-01-01
Re: Pickle error - pytz
2005-01-01
2005-01-01
2005-01-01
2005-01-01
Pickle error - pytz
Neil Schemenauer
2005-01-01
On Sat, Jan 01, 2005 at 06:18:33AM -0800, Michael Watkins wrote:
> PicklingError: Can't pickle : it's not
> the same object as sous.pytz.zoneinfo.UTC.UTC

It looks like pytz data is not designed to be picked.  This is the
problem code from pytz:

    class UCT(StaticTzInfo):
        '''UCT timezone definition. See datetime.tzinfo for details'''
        _zone = 'UCT'
        _utcoffset = timedelta(seconds=0)
        _tzname = 'UCT'

    UCT = UCT()

You could avoid the exception by renaming the class 'UCT' to
something else (e.g. '_UCT').  I think that will not produce the
desired behavior however since it looks like 'UCT' is supposed to be
a singleton.

  Neil

reply