<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm using the ZODB storage for the first time and 
am basically tring to add some user info to a FileStorage object. My code is a 
python script pasted below.</FONT></DIV>
<DIV><FONT face=Arial size=2>My problem is that when I'm trying to test this in 
the Zope management interface I keep getting the error:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>
<P><STRONG>Error Type: RuntimeError</STRONG><BR><STRONG>Error Value: function 
attributes not accessible in restricted mode</STRONG><BR></P>
<P><FONT face=Arial size=2>.... any idea what could be causing this problem and, 
more importantly, how I can solve it??</FONT></P>
<P><FONT face=Arial size=2></FONT>&nbsp;</P>
<P><FONT face=Arial size=2>Cheers</FONT></P>
<P><FONT face=Arial size=2>Ruth</FONT></P></DIV>
<DIV><FONT face=Arial size=2><BR>import ZODB <BR>from ZODB import DB<BR>from 
ZODB.FileStorage import FileStorage<BR>from ZODB.PersistentMapping import 
PersistentMapping <BR>from Persistence import Persistent</DIV>
<DIV>&nbsp;</DIV>
<DIV>class AnvilUser(Persistent):<BR>&nbsp;&nbsp;&nbsp; def setUserName(self, 
username): self.username = username<BR>&nbsp;&nbsp;&nbsp; def setFullName(self, 
fname): self.fname = fname<BR>&nbsp;&nbsp;&nbsp; def setSurName(self, surname): 
self.surname = surname<BR>&nbsp;&nbsp;&nbsp; def setEMail(self, email): 
self.email = email</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>storage = FileStorage('anvilusers.fs')<BR>db = 
DB(storage)<BR>connection = db.open()<BR>root = connection.root()<BR>if not 
root.has_key('users'):root["users"] = {}<BR>users = root['users']<BR>anviluser = 
AnvilUser()<BR>anviluser.setUsername(username)<BR>anviluser.setFullName(fname)<BR>anviluser.setSurName(surname)<BR>anviluser.setEMail(email)<BR>users.append(anviluser)<BR>root['users'] 

users<BR>get_transaction.commit()<BR>connection.close()<BR></FONT></DIV></BODY></HTML>