[Zope3-Users] PsycopgDA problem

Håkan Johansson ignem at raintervention.se
Mon Feb 27 06:32:36 EST 2006


I have problems getting my Postgres database connection to work.
I am using FreeBSD and have installed psycopg-1.1.21 via ports.  
PsycopgDA I got from the zope svn  
(svn://svn.zope.org/repos/main/psycopgda/trunk). The Zope version is  
3.2.0.

I followed the README.txt file and have the database adapter added and  
active (was that by default).
When I try a simple SQL query on the test page, I get a  
ForbiddenAttribute exception (see below for trace).

Any idea how I can fix this?



Traceback
========
Traceback (innermost last):
   Module zope.publisher.publish, line 138, in publish
     result = publication.callObject(request, object)
   Module zope.app.publication.zopepublication, line 161, in callObject
     return mapply(ob, request.getPositionalArguments(), request)
   Module zope.publisher.publish, line 113, in mapply
     return debug_call(object, args)
    - __traceback_info__: <security proxied  
zope.app.pagetemplate.simpleviewclass.SimpleViewClass from  
/usr/local/www/Zope-3.2.0/lib/python/zope/app/rdb/browser/ 
rdbtestresults.pt instance at 0xb0218ec>
   Module zope.publisher.publish, line 119, in debug_call
     return object(*args)
   Module zope.app.pagetemplate.simpleviewclass, line 44, in __call__
     return self.index(*args, **kw)
   Module zope.app.pagetemplate.viewpagetemplatefile, line 83, in  
__call__
     return self.im_func(im_self, *args, **kw)
   Module zope.app.pagetemplate.viewpagetemplatefile, line 51, in  
__call__
     sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
   Module zope.pagetemplate.pagetemplate, line 117, in pt_render
     strictinsert=0, sourceAnnotations=sourceAnnotations)()
   Module zope.tal.talinterpreter, line 277, in __call__
     self.interpret(self.program)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 908, in do_useMacro
     self.interpret(macro)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 538, in do_optTag_tal
     self.do_optTag(stuff)
   Module zope.tal.talinterpreter, line 523, in do_optTag
     return self.no_tag(start, program)
   Module zope.tal.talinterpreter, line 518, in no_tag
     self.interpret(program)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 878, in do_defineMacro
     self.interpret(macro)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 976, in do_defineSlot
     self.interpret(block)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 966, in do_defineSlot
     self.interpret(slot)
   Module zope.tal.talinterpreter, line 352, in interpret
     handlers[opcode](self, args)
   Module zope.tal.talinterpreter, line 588, in do_setLocal_tal
     self.engine.setLocal(name, self.engine.evaluateValue(expr))
   Module zope.tales.tales, line 696, in evaluate
     return expression(self)
    -  
/usr/local/www/Zope-3.2.0/lib/python/zope/app/rdb/browser/ 
rdbtestresults.pt
    - Line 15, Column 2
    - Expression: <PathExpr standard:u'view/getTestResults'>
    - Names:
       {'args': (),
        'context': <psycopgda.adapter.PsycopgAdapter object at  
0x95e4f6c>,
        'default': <object object at 0x815c538>,
        'loop': {},
        'nothing': None,
        'options': {},
        'repeat': {},
        'request': <zope.publisher.browser.BrowserRequest instance  
URL=http://82.182.101.160:7777/++etc++site/tools/pgdb/test.html>,
        'template':  
<zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object  
at 0x9fabf6c>,
        'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at  
0xb00d34c>,
        'view': <zope.app.pagetemplate.simpleviewclass.SimpleViewClass  
from  
/usr/local/www/Zope-3.2.0/lib/python/zope/app/rdb/browser/ 
rdbtestresults.pt object at 0xb0218ec>,
        'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper  
object at 0xaee4f4c>}
   Module zope.tales.expressions, line 205, in __call__
     return self._eval(econtext)
   Module zope.tales.expressions, line 199, in _eval
     return ob()
   Module zope.app.rdb.browser.rdb, line 27, in getTestResults
     result = queryForResults(self.context(), sql)
   Module zope.app.rdb, line 401, in queryForResults
     cursor = conn.cursor()
ForbiddenAttribute: ('cursor', <psycopgda.adapter.PsycopgConnection  
object at 0xaede1cc>)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4672 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20060227/f08e8c92/attachment-0001.bin


More information about the Zope3-users mailing list