[Zope] TypeError: 'in <string>' requires character as left operand
Dieter Maurer
dieter at handshake.de
Tue Nov 11 14:19:34 EST 2003
Gordon Sullivan wrote at 2003-11-10 12:49 -0500:
> Quoting Dieter Maurer <dieter at handshake.de>:
>
> > Gordon Sullivan wrote at 2003-11-7 13:52 -0500:
> > > The traceback is at the bottom.
> > > ...
> > > > I seem to have messed up my Plone real good. I'm not sure, but I
> > think
> > > > what I did to cause this was clicking the drop-down on the preferences
> > > > screen for the editor. There was only one selection, 'None'.
> > > >
> > > > Now if I try to access /folder_contents for any folder, it gives me a
> > > > Site error and the message:
> > > >
> > > > "'in ' requires character as left operand".
> > > ...
> > > Module Products.PageTemplates.PageTemplate, line 95, in pt_render
> > > - <FSPageTemplate at /Plone/folder_contents used for /Plone/Members>
> > > ...
> > > - Line 66, Column 12
> > > - Expression: <PythonExpr
> > here.sortObjects(here.allowedContentTypes())>
> > > - Names:
> > > ...
> > > 'here': <PloneFolder instance at 0229AA48>,
> > > Module Products.CMFCore.TypesTool, line 175, in allowType
> > > TypeError: 'in <string>' requires character as left operand
> >
> > This indicates that the "allowed_content_types" attribute
> > of the PloneFolder "/Plone/Members" is a string.
> > It should be a sequence of strings.
> ...
> Ok, assuming for now I figure out how to access my ZODB with an interactive
> Python shell and repair the bad data without damaging anything else, how do I
> prevent this from happening? The problem isn't confined to one specific folder,
> *all* folders exhibit this behavior. I can see in the site error_log where new
> users are signing up and getting that error on their personal Members folder.
Sorry, I have been wrong!
I did not look carefully enough at the source in "TypesTool".
The "allowed_content_types" is not faulty for your
"/Plone/Members" instance but for its associated "TypeInformation"
(see "Products/CMFCore/TypesTool")).
Therefore, you get the same error for all "PloneFolders" (as
they use the same "TypeInformation" instance).
Unfortunately, I am not an oracle (or prophet or something like that).
I cannot tell you how your "TypeInformation" instance became
corrupt.
The concrete (broken) value for "allowed_content_types"
may give some hint on when and why it became wrong.
But, this value is beyond my reach (unless you look at it and
report what you find ;-)).
--
Dieter
More information about the Zope
mailing list