find_members, get_cached_member -> unexpected keyword argument 'location'
Marc Petitmermet <[email protected]> Sat, 15 Aug 2009 20:15:38 +0200
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
dear all
i'm porting an application from silva-1.5.x to silva-2.1.x and i have
a problem i don't know how to deal with yet.
i get error messages like "get_cached_member() got an unexpected
keyword argument 'location'" or "find_member() got an unexpected
keyword argument 'location'", e.g. from this code:
from AccessControl import getSecurityManager
user = getSecurityManager().getUser().getId()
return context.sec_get_member(user).fullname()
i also get the "get_cached_member() got an unexpected keyword argument
'location'" error in the properties and the access tab of the smi.
this is strange because my code should only have a negative effect, if
at all, on the preview tab and not on the others.
to investigate further i have created a completely new silva root in
the same zope instance with absolutely none of my code. and i get
again the same error "get_cached_member() got an unexpected keyword
argument 'location'" in the access tab.
this is zope-2.10, silva-2.1.4, python-2.4.5
and the strange thing: i have a second zope instance with the exact
same program versions but without this problem...
any advice?
regards,
marc
Request URL
http://foo.com:8100/silva/edit/tab_metadata
Exception Type
TypeError
Exception Value
get_cached_member() got an unexpected keyword argument 'location'
Traceback (innermost last):
• Module ZPublisher.Publish, line 119, in publish
• Module ZPublisher.mapply, line 88, in mapply
• Module ZPublisher.Publish, line 42, in call_object
• Module Shared.DC.Scripts.Bindings, line 313, in __call__
• Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
• Module Products.FileSystemSite.FSPageTemplate, line 195, in _exec
• Module Products.FileSystemSite.FSPageTemplate, line 134, in pt_render
• Module Products.PageTemplates.PageTemplate, line 89, in pt_render
• Module zope.pagetemplate.pagetemplate, line 117, in pt_render
Warning: Macro expansion failed
Warning: exceptions.KeyError: 'view'
• Module zope.tal.talinterpreter, line 271, in __call__
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 534, in do_optTag_tal
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 891, in do_useMacro
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 949, in do_defineSlot
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 536, in do_optTag_tal
• Module zope.tal.talinterpreter, line 521, in do_optTag
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 855, in do_condition
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 536, in do_optTag_tal
• Module zope.tal.talinterpreter, line 521, in do_optTag
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 536, in do_optTag_tal
• Module zope.tal.talinterpreter, line 521, in do_optTag
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 891, in do_useMacro
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 536, in do_optTag_tal
• Module zope.tal.talinterpreter, line 521, in do_optTag
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 536, in do_optTag_tal
• Module zope.tal.talinterpreter, line 521, in do_optTag
• Module zope.tal.talinterpreter, line 516, in no_tag
• Module zope.tal.talinterpreter, line 346, in interpret
• Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
• Module zope.tales.tales, line 696, in evaluate
URL: file:Silva/views/edit/macro_edit_metadata.pt
Line 17, Column 2
Expression: <PythonExpr view.get_metadata(content,
category=metadata_category) or nothing>
Names:
{'container': <DirectoryViewSurrogate at /silva/service_views/Silva/
edit>, 'context': <DirectoryViewSurrogate at /silva/service_views/
Silva/edit/Container/Publication>, 'default': <object object at
0xb7f3d528>, 'here': <DirectoryViewSurrogate at /silva/service_views/
Silva/edit/Container/Publication>, 'loop': {}, 'nothing': None,
'options': {'args': ()}, 'repeat':
<Products.PageTemplates.Expressions.SafeMapping object at 0xb25195ec>,
'request': <HTTPRequest, URL=http://foo.com:8100/silva/edit/
tab_metadata>, 'root': <Application at >, 'template': <FSPageTemplate
at /silva/service_views/Silva/edit/tab_metadata used for /silva/
service_views/Silva/edit/Container/Publication>, 'traverse_subpath':
[], 'user': <User 'admin'>}
• Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
__traceback_info__: view.get_metadata(content,
category=metadata_category) or nothing
• Module PythonExpr, line 1, in <expression>
• Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
• Module Shared.DC.Scripts.Bindings, line 313, in __call__
• Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
• Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
• Module None, line 49, in get_metadata
<FSPythonScript at /silva/service_views/Silva/edit/get_metadata used
for /silva/service_views/Silva/edit/Container/Publication>
Line 49
• Module Products.SilvaMetadata.Binding, line 269, in listAcquired
• Module Products.SilvaMetadata.Binding, line 489, in _getData
• Module Products.SilvaMetadata.Element, line 207, in getDefault
• Module Products.Formulator.Field, line 123, in get_value
• Module Products.Formulator.TALESField, line 44, in __call__
• Module zope.tales.tales, line 696, in evaluate
Expression: <PythonExpr content.sec_get_creator_info().fullname()>
Names:
{'content': <Silva Root instance silva>, 'default': <object object at
0xb7f3d528>, 'field': <StringField at /silva/service_metadata/
collection/silva-extra/creator/creator>, 'form': <MetadataElement at /
silva/service_metadata/collection/silva-extra/creator>, 'here':
<MetadataElement at /silva/service_metadata/collection/silva-extra/
creator>, 'loop': {}, 'nothing': None, 'repeat':
<Products.PageTemplates.Expressions.SafeMapping object at 0xb25303ec>,
'request': <HTTPRequest, URL=http://foo.com:8100/silva/edit/
tab_metadata>}
• Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
__traceback_info__: content.sec_get_creator_info().fullname()
• Module PythonExpr, line 1, in <expression>
• Module Products.Silva.Security, line 293, in sec_get_creator_info
• Module Products.Silva.Security, line 248, in sec_get_member
TypeError: get_cached_member() got an unexpected keyword argument
'location'