[Zope] TypeError: 'in <string>' requires character as left operand

Gordon Sullivan gordon at gortek.com
Fri Nov 7 08:39:22 EST 2003



I forgot to mention that using Zope's Undo feature doesn't fix the problem.


    -Thanks for the tip Bakhtiar!




Gordon Sullivan






Quoting Gordon Sullivan <gordon at gortek.com>:




> 


> Hi,


> 


> 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".  


> 


> I'm running the windoze install-shield version of plone [ (Zope 2.6.1


> (binary


> release, python 2.1, win32-x86), python 2.1.3, win32)] on my computer at


> work.


> I just started showing my managers how cool Plone is today, so of course I


> had


> to break it...  8~[


> 


> I've googled and seen references such as these:


> 


> (http://mail.zope.org/pipermail/zope-cmf/2003-April/018187.html)


> <snip>


> > The simplest thing possible is to add another check


> > on line line 174 in TypesTool.py


> >


> > if not self.allowed_content_types: return 0


> </snip>


> 


> 


> And also this:


> 


> (http://copilotconsulting.com/mail-archives/zope.2003/11509.html)


> <snip>


> 


> Figuring this out was the hard part. Fixing it was easy: Zope


> provides a simple 'argument conversion' facility. Adding ':list' to


> the addForm HTML form ensures that the multiple field value(s) will


> always be treated as a Python list, even if the multiple field only


> had a single value.


> 


> To illustrate the fix (similar to the one I made in my 'addForm'


> HTML), assume the line with the problem property was:


> 


>   <input type="checkbox" name="choices" value="choice_one" />


> 


> Change it to the following, which - via ':list' - ensures the Zope


> argument conversion of 'choices' so that it is always a list:


> 


>   <input type="checkbox" name="choices:list" value="choice_one" />


> 


> </snip>


> 


> 


> I've also read  Issue 1336


> (http://plone.org/collector/1336/ISSUE_TRANSCRIPT/view) of  Issue Collector


> [Plone] that discusses this problem,


> and now I remember experimenting with the 'Allow Discussion' checkbox at


> some


> point...   Maybe that's what caused it?  


> 


> 


> I'm not sure what to make of things because I'm pretty new to the guts of


> Zope


> and Plone.  Whatever I did to cause this problem I did from the user


> interface


> of plone, not the ZMI or editing python files.


> 


> 


> If it will help I can send the traceback from the Site error log.


> 


> 


> Does anyone know what the fix for this is?


> 


> Thanks so much,


> Gordon Sullivan 


> 


> 


> _______________________________________________


> Zope maillist  -  Zope at zope.org


> http://mail.zope.org/mailman/listinfo/zope


> **   No cross posts or HTML encoding!  **


> (Related lists - 


>  http://mail.zope.org/mailman/listinfo/zope-announce


>  http://mail.zope.org/mailman/listinfo/zope-dev )


> 










More information about the Zope mailing list