[Zope] TypeError when copy FS python script to custom folder

Edmund Moseley edmund at unc.edu
Tue Jan 9 16:03:45 EST 2007


I am in the process of trying to add RAMCaches to my python scripts, 
and wanted to test it out TTW via custom.
However, whenever I make a copy of my FS python script to custom, and 
then view the object which uses this script, I get the following error:

TypeError: arg is not a code object

This python script is used by my archetype object to fetch a vocabulary 
list, by calling a separate zsql method.

Any ideas why this happens?

Thanks,
Edmund

Here is the last part of the traceback:

<snip>
#  Module TAL.TALInterpreter, line 281, in interpret
# Module TAL.TALInterpreter, line 507, in do_setLocal_tal
# Module Products.PageTemplates.TALES, line 221, in evaluate
URL: file:MEIS/skins/MEIS/vocab_or_other.pt
Line 52, Column 6
Expression: <PythonExpr field.Vocabulary(here)>
Names:

{'container': <PloneSite at /meis>,
'context': <Autopsy at /meis/meis/unfiledautopsies/b199301068>,
'default': <Products.PageTemplates.TALES.Default instance at 0x2aaab56cb4d0>,
'here': <Autopsy at /meis/meis/unfiledautopsies/b199301068>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x88182d8>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter 
instance at 0x2aaab56cb6c8>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x88182d8>,
'request': <HTTPRequest, 
URL=https://plone.ocme.unc.edu/meis/meis/unfiledautopsies/b199301068/autopsy_view>,
'root': <Application at >,
'template': <FSPageTemplate at /meis/autopsy_view used for 
/meis/meis/unfiledautopsies/b199301068>,
'traverse_subpath': [],
'user': <PropertiedUser 'zadmin'>}

# Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
__traceback_info__: field.Vocabulary(here)
# Module Python expression "field.Vocabulary(here)", line 1, in <expression>
# Module Products.Archetypes.Field, line 441, in Vocabulary
# Module Products.Archetypes.utils, line 137, in mapply
# Module inspect, line 607, in getargs

TypeError: arg is not a code object


More information about the Zope mailing list