Hi!
I am trying to execute following code
import ZODB
from Persistence import Persistent
class Employee(Persistent):
def setName(self, name):
self.name = name
but getting following error
Error Type: ImportError
Error Value:
import of "Persistent" from "Persistence" is unauthorized. You are not
allowed to access 'Persistent' in this context
this is my full error log
| Time | 2009/03/24 22:31:33.559 GMT+0530 |
|---|---|
| User Name (User Id) | admin (admin) |
| Request URL | http://localhost:9673/DeveloperGuide/Simpleinterface |
| Exception Type | ImportError |
| Exception Value | import of "Persistent" from "Persistence" is unauthorized. You are not allowed to access 'Persistent' in this context |
Traceback (innermost last):
| -C | '' |
|---|
| dtpref_rows | '20' |
|---|---|
| dtpref_cols | '90%' |
| tree-s | 'eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew' |
| GLog | '%7Bleft%3A0%2Ctop%3A0%2Cwidth%3A1175%2Cheight%3A630%2CpriorityDefaults%3A%7BLog%3A4%7D%2CdefaultPriority%3A3%2CtrackRPC%3Anull%7D' |
| SESSION | <bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>> |
|---|
| TraversalRequestNameStack | [] |
|---|---|
| AUTHENTICATED_USER | <User 'admin'> |
| URL | 'http://localhost:9673/DeveloperGuide/Simpleinterface' |
| SERVER_URL | 'http://localhost:9673' |
| AUTHENTICATION_PATH | '' |
| traverse_subpath | [] |
| PUBLISHED | <PythonScript at /DeveloperGuide/Simpleinterface> |
| ACTUAL_URL | 'http://localhost:9673/DeveloperGuide/Simpleinterface' |
| URL0 | http://localhost:9673/DeveloperGuide/Simpleinterface |
| URL1 | http://localhost:9673/DeveloperGuide |
| URL2 | http://localhost:9673 |
| BASE0 | http://localhost:9673 |
| BASE1 | http://localhost:9673 |
| BASE2 | http://localhost:9673/DeveloperGuide |
| BASE3 | http://localhost:9673/DeveloperGuide/Simpleinterface |
| HTTP_COOKIE | 'dtpref_rows="20"; dtpref_cols="90%"; GLog=%7Bleft%3A0%2Ctop%3A0%2Cwidth%3A1175%2Cheight%3A630%2CpriorityDefaults%3A%7BLog%3A4%7D%2CdefaultPriority%3A3%2CtrackRPC%3Anull%7D; tree-s="eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew"' |
|---|---|
| SERVER_SOFTWARE | 'Zope/(Zope 2.10.5-final, python 2.4.5, linux2) ZServer/1.1' |
| SCRIPT_NAME | '' |
| REQUEST_METHOD | 'GET' |
| PATH_INFO | '/DeveloperGuide/Simpleinterface' |
| SERVER_PROTOCOL | 'HTTP/1.1' |
| channel.creation_time | 1237914020 |
| CONNECTION_TYPE | 'keep-alive' |
| HTTP_ACCEPT_CHARSET | 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' |
| HTTP_USER_AGENT | 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0.7' |
| HTTP_REFERER | 'http://localhost:9673/DeveloperGuide/Simpleinterface/ZPythonScriptHTML_editForm' |
| SERVER_NAME | '0.0.0.0' |
| REMOTE_ADDR | '127.0.0.1' |
| PATH_TRANSLATED | '/DeveloperGuide/Simpleinterface' |
| SERVER_PORT | '9673' |
| HTTP_HOST | 'localhost:9673' |
| HTTP_ACCEPT | 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' |
| GATEWAY_INTERFACE | 'CGI/1.1' |
| HTTP_ACCEPT_LANGUAGE | 'en-us,en;q=0.5' |
| HTTP_ACCEPT_ENCODING | 'gzip,deflate' |
| HTTP_KEEP_ALIVE | '300' |