so what makes an attribute unpicklableusuallyit has something to do with timesensitive attributes that it would not make sense to load in the future for exampleif we have an open network socketopen filerunning threador database connection stored as an attribute on an objectit would not make sense to pickle these objectsa lot of operating system state would simply be gone when we attempted to reload them later we can' just pretend thread or socket connection exists and make it appearnowe need to somehow customize how such transient data is stored and restored here' class that loads the contents of web page every hour to ensure that they stay up to date it uses the threading timer class to schedule the next updatefrom threading import timer import datetime from urllib request import urlopen class updatedurldef __init__(selfurl)self url url self contents 'self last_updated none self update(def update(self)self contents urlopen(self urlread(self last_updated datetime datetime now(self schedule(def schedule(self)self timer timer( self updateself timer setdaemon(trueself timer start(the urlcontentsand last_updated are all pickleablebut if we try to pickle an instance of this classthings go little nutty on the self timer instanceu updatedurl(import pickle serialized pickle dumps(utraceback (most recent call last)file ""line in serialized pickle dumps(u_pickle picklingerrorcan' pickle attribute lookup lock on _thread failed