Dear All,<br><br>This seems to be generally a problem with pickle but I hope I will be able to get some inputs for the problem.<br><br>In one function of my grok.Application class I'm dynamically creating a class<br><br>
self.VarName = type('class name', (<base class>,), dict())<br><b> <base class> does inherit grok.Container.</b><br><br>While running this I'm getting following error:<br><br>Module <span title="c:\documents and settings\user\.buildout\eggs\zodb3-3.10.5-py2.7-win32.egg\ZODB\serialize.py">ZODB.serialize</span>:<b>422</b> in <code>serialize</code> <a href="http://localhost:8080/bizopine#" target="_blank"> <img src="http://localhost:8080/_debug/media/plus.jpg" border="0" height="9" width="9"> </a><br>
<code><a href="http://localhost:8080/bizopine#" target="_blank">>> </a><font color="#0000AF"><b>return</b></font> <font color="#333333">self</font><b>.</b><font color="#333333">_dump</font><b>(</b><font color="#333333">meta</font><b>,</b> <font color="#333333">obj</font><b>.</b><font color="#333333">__getstate__</font><b>(</b><b>)</b><b>)</b></code><br>
Module <span title="c:\documents and settings\user\.buildout\eggs\zodb3-3.10.5-py2.7-win32.egg\ZODB\serialize.py">ZODB.serialize</span>:<b>431</b> in <code>_dump</code> <a href="http://localhost:8080/bizopine#" target="_blank"> <img src="http://localhost:8080/_debug/media/plus.jpg" border="0" height="9" width="9"> </a><br>
<code><a href="http://localhost:8080/bizopine#" target="_blank">>> </a><font color="#333333">self</font><b>.</b><font color="#333333">_p</font><b>.</b><font color="#333333">dump</font><b>(</b><font color="#333333">state</font><b>)</b></code><br>
<b>PicklingError: Can't pickle <class '<appname>.app.<class name>'>: attribute lookup </b><b><appname>.app.<class name></b><b> failed</b><br><br>Pickling documentation does say that :<br>
<h2>What can be pickled and unpickled</h2>classes that are defined at the top level of a module<br><br><b>But is it the problem here and if yes then what can be the possible solution for this ?</b><br><br>Thanks,<br>Anurag