Hi!<br><br>I am trying to execute following code<br><br><i><b>import ZODB<br>from Persistence import Persistent<br><br>class Employee(Persistent):<br><br>    def setName(self, name):<br>        <a href="http://self.name">self.name</a> = name<br>
</b></i><br>but getting following error<br><br><i><strong>Error Type: ImportError</strong><br><strong>Error Value:
import of &quot;Persistent&quot; from &quot;Persistence&quot; is unauthorized. You are not
allowed to access &#39;Persistent&#39; in this context</strong></i>
      <br><br>this is my full error log<br><br><br><table><tbody><tr><th align="left" valign="top">Time</th>
  <td>2009/03/24 22:31:33.559 GMT+0530</td>
 </tr>
 <tr>
  <th align="left" valign="top">User Name (User Id)</th>
  <td> admin (admin)</td>
 </tr>
 <tr>
  <th align="left" valign="top">Request URL</th>
  <td><a href="http://localhost:9673/DeveloperGuide/Simpleinterface">http://localhost:9673/DeveloperGuide/Simpleinterface</a></td>
 </tr>
 <tr>
  <th align="left" valign="top">Exception Type</th>
  <td>ImportError</td>
 </tr>
 <tr>
  <th align="left" valign="top">Exception Value</th>
  <td>import of &quot;Persistent&quot; from &quot;Persistence&quot; is unauthorized. You are not allowed to access &#39;Persistent&#39; in this context</td>
 </tr>
</tbody></table>

<div><p>Traceback (innermost last):
</p><ul><li>  Module ZPublisher.Publish, line 119, in publish</li><li>  Module ZPublisher.mapply, line 88, in mapply</li><li>  Module ZPublisher.Publish, line 42, in call_object</li><li>  Module Shared.DC.Scripts.Bindings, line 313, in __call__</li>
<li>  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec</li><li>  Module Products.PythonScripts.PythonScript, line 327, in _exec</li><li>  Module None, line 2, in Simpleinterface<br>
<b>&lt;PythonScript at /DeveloperGuide/Simpleinterface&gt;</b><br>
<b>Line 2</b></li><li>  Module AccessControl.ZopeGuards, line 284, in guarded_import</li></ul>ImportError: import of &quot;Persistent&quot; from &quot;Persistence&quot; is
unauthorized. You are not allowed to access &#39;Persistent&#39; in this
context
</div>


<p><a href="http://localhost:9673/error_log/getLogEntryAsText?id=1237914093.560.351902229926">Display
   traceback as text</a></p>


    
<p>
</p><form action="manage_main" method="get">
<input name="submit" value=" Return to log " type="submit">
</form>

    
<h3>REQUEST</h3>
<h3>form</h3><table><tbody><tr align="left" valign="top"><th>-C</th><td>&#39;&#39;</td></tr></tbody></table><h3>cookies</h3><table><tbody><tr align="left" valign="top"><th>dtpref_rows</th><td>&#39;20&#39;</td></tr><tr align="left" valign="top">
<th>dtpref_cols</th><td>&#39;90%&#39;</td></tr><tr align="left" valign="top"><th>tree-s</th><td>&#39;eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew&#39;</td></tr><tr align="left" valign="top"><th>GLog</th><td>&#39;%7Bleft%3A0%2Ctop%3A0%2Cwidth%3A1175%2Cheight%3A630%2CpriorityDefaults%3A%7BLog%3A4%7D%2CdefaultPriority%3A3%2CtrackRPC%3Anull%7D&#39;</td>
</tr></tbody></table><h3>lazy items</h3><table><tbody><tr align="left" valign="top"><th>SESSION</th><td>&lt;bound method SessionDataManager.getSessionData of &lt;SessionDataManager at /session_data_manager&gt;&gt;</td></tr>
</tbody></table><h3>other</h3><table><tbody><tr align="left" valign="top"><th>TraversalRequestNameStack</th><td>[]</td></tr><tr align="left" valign="top"><th>AUTHENTICATED_USER</th><td>&lt;User &#39;admin&#39;&gt;</td></tr>
<tr align="left" valign="top"><th>URL</th><td>&#39;<a href="http://localhost:9673/DeveloperGuide/Simpleinterface">http://localhost:9673/DeveloperGuide/Simpleinterface</a>&#39;</td></tr><tr align="left" valign="top"><th>SERVER_URL</th>
<td>&#39;<a href="http://localhost:9673">http://localhost:9673</a>&#39;</td></tr><tr align="left" valign="top"><th>AUTHENTICATION_PATH</th><td>&#39;&#39;</td></tr><tr align="left" valign="top"><th>traverse_subpath</th><td>
[]</td></tr><tr align="left" valign="top"><th>PUBLISHED</th><td>&lt;PythonScript at /DeveloperGuide/Simpleinterface&gt;</td></tr><tr align="left" valign="top"><th>ACTUAL_URL</th><td>&#39;<a href="http://localhost:9673/DeveloperGuide/Simpleinterface">http://localhost:9673/DeveloperGuide/Simpleinterface</a>&#39;</td>
</tr><tr align="left" valign="top"><th>URL0</th><td><a href="http://localhost:9673/DeveloperGuide/Simpleinterface">http://localhost:9673/DeveloperGuide/Simpleinterface</a></td></tr><tr align="left" valign="top"><th>URL1</th>
<td><a href="http://localhost:9673/DeveloperGuide">http://localhost:9673/DeveloperGuide</a></td></tr><tr align="left" valign="top"><th>URL2</th><td><a href="http://localhost:9673">http://localhost:9673</a></td></tr><tr align="left" valign="top">
<th>BASE0</th><td><a href="http://localhost:9673">http://localhost:9673</a></td></tr><tr align="left" valign="top"><th>BASE1</th><td><a href="http://localhost:9673">http://localhost:9673</a></td></tr><tr align="left" valign="top">
<th>BASE2</th><td><a href="http://localhost:9673/DeveloperGuide">http://localhost:9673/DeveloperGuide</a></td></tr><tr align="left" valign="top"><th>BASE3</th><td><a href="http://localhost:9673/DeveloperGuide/Simpleinterface">http://localhost:9673/DeveloperGuide/Simpleinterface</a></td>
</tr></tbody></table><h3>environ</h3><table><tbody><tr align="left" valign="top"><th>HTTP_COOKIE</th><td>&#39;dtpref_rows=&quot;20&quot;;
dtpref_cols=&quot;90%&quot;;
GLog=%7Bleft%3A0%2Ctop%3A0%2Cwidth%3A1175%2Cheight%3A630%2CpriorityDefaults%3A%7BLog%3A4%7D%2CdefaultPriority%3A3%2CtrackRPC%3Anull%7D;
tree-s=&quot;eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew&quot;&#39;</td></tr><tr align="left" valign="top"><th>SERVER_SOFTWARE</th><td>&#39;Zope/(Zope 2.10.5-final, python 2.4.5, linux2) ZServer/1.1&#39;</td></tr><tr align="left" valign="top">
<th>SCRIPT_NAME</th><td>&#39;&#39;</td></tr><tr align="left" valign="top"><th>REQUEST_METHOD</th><td>&#39;GET&#39;</td></tr><tr align="left" valign="top"><th>PATH_INFO</th><td>&#39;/DeveloperGuide/Simpleinterface&#39;</td>
</tr><tr align="left" valign="top"><th>SERVER_PROTOCOL</th><td>&#39;HTTP/1.1&#39;</td></tr><tr align="left" valign="top"><th>channel.creation_time</th><td>1237914020</td></tr><tr align="left" valign="top"><th>CONNECTION_TYPE</th>
<td>&#39;keep-alive&#39;</td></tr><tr align="left" valign="top"><th>HTTP_ACCEPT_CHARSET</th><td>&#39;ISO-8859-1,utf-8;q=0.7,*;q=0.7&#39;</td></tr><tr align="left" valign="top"><th>HTTP_USER_AGENT</th><td>&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0.7&#39;</td>
</tr><tr align="left" valign="top"><th>HTTP_REFERER</th><td>&#39;<a href="http://localhost:9673/DeveloperGuide/Simpleinterface/ZPythonScriptHTML_editForm">http://localhost:9673/DeveloperGuide/Simpleinterface/ZPythonScriptHTML_editForm</a>&#39;</td>
</tr><tr align="left" valign="top"><th>SERVER_NAME</th><td>&#39;0.0.0.0&#39;</td></tr><tr align="left" valign="top"><th>REMOTE_ADDR</th><td>&#39;127.0.0.1&#39;</td></tr><tr align="left" valign="top"><th>PATH_TRANSLATED</th>
<td>&#39;/DeveloperGuide/Simpleinterface&#39;</td></tr><tr align="left" valign="top"><th>SERVER_PORT</th><td>&#39;9673&#39;</td></tr><tr align="left" valign="top"><th>HTTP_HOST</th><td>&#39;localhost:9673&#39;</td></tr><tr align="left" valign="top">
<th>HTTP_ACCEPT</th><td>&#39;text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&#39;</td></tr><tr align="left" valign="top"><th>GATEWAY_INTERFACE</th><td>&#39;CGI/1.1&#39;</td></tr><tr align="left" valign="top">
<th>HTTP_ACCEPT_LANGUAGE</th><td>&#39;en-us,en;q=0.5&#39;</td></tr><tr align="left" valign="top"><th>HTTP_ACCEPT_ENCODING</th><td>&#39;gzip,deflate&#39;</td></tr><tr align="left" valign="top"><th>HTTP_KEEP_ALIVE</th><td>&#39;300&#39;</td>
</tr></tbody></table><br><br><br>I think I have to change permissions, but the question is from WHERE please help me out..<br><br><br>Thanks,<br>Amol<br>