python - How to store socket object in google app engine Datastore (aka can I pickle a socket object) -


i need store socket object datastore/memcache in gae python based app.

the approach taking 1. use pickle.dumps convert socket object string 2. when needed retrieve string , unpickle using pickle.loads(<pickledsock>)

complete error message below, main part is:

typeerror: __init__() got unexpected keyword argument '_sock' 

does mean can't use above approach because "unpickling" won't work?

ssl_sock2use=pickle.loads(pickledsock) file "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 1382, in loads     return unpickler(file).load()   file "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 858, in load     dispatch[key](self)   file "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 1217, in load_build     setstate(state)   file "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/socket.py", line 181, in __setstate__     self.__init__(_sock=_sock) typeerror: __init__() got unexpected keyword argument '_sock' 


Comments

Popular posts from this blog

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -