Error: 'in ' requires character as left operand
I get this error whenever I click on the "Security" Tab at the Root Folder. This happenened right after I created a new role, and saved my changes. Next thing I knew, no more getting to the security tab. When I view source on the page that comes up with the error, I see the following: <html><head><title>Zope</title></head><body bgcolor="#FFFFFF"> 'in <string>' requires character as left operand <p><a href="http://www.zope.org/Credits" target="_top"><img src="http://10.8.0.5/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope" /></a></p></body></html> <!-- Traceback (innermost last): File C:\PROGRA~1\Zope\lib\python\ZPublisher\Publish.py, line 150, in publish_module File C:\PROGRA~1\Zope\lib\python\ZPublisher\Publish.py, line 114, in publish File C:\PROGRA~1\Zope\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook (Object: Zope) File C:\PROGRA~1\Zope\lib\python\ZPublisher\Publish.py, line 98, in publish File C:\PROGRA~1\Zope\lib\python\ZPublisher\mapply.py, line 88, in mapply (Object: manage_access) File C:\PROGRA~1\Zope\lib\python\ZPublisher\Publish.py, line 39, in call_object (Object: manage_access) File C:\PROGRA~1\Zope\lib\python\AccessControl\Role.py, line 186, in manage_access (Object: Zope) File C:\PROGRA~1\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 252, in __call__ (Object: _normal_manage_access) File C:\PROGRA~1\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 283, in _bindAndExec (Object: _normal_manage_access) File C:\PROGRA~1\Zope\lib\python\App\special_dtml.py, line 172, in _exec (Object: _normal_manage_access) File C:\PROGRA~1\Zope\lib\python\DocumentTemplate\DT_With.py, line 76, in render (Object: _.namespace(valid_roles=valid_roles())) File C:\PROGRA~1\Zope\lib\python\DocumentTemplate\DT_In.py, line 617, in renderwob (Object: permission_settings) File C:\PROGRA~1\Zope\lib\python\AccessControl\Role.py, line 111, in permission_settings (Object: Zope) File C:\PROGRA~1\Zope\lib\python\AccessControl\Role.py, line 106, in <lambda> TypeError: (see above) --> Any help appreciated... --Ben
Benjamin Eastwood writes:
I get this error whenever I click on the "Security" Tab at the Root Folder. This happenened right after I created a new role, and saved my changes. Apparently, a string was saved when it should have been a sequence of strings.
I cannot tell you why. Maybe a name clash between your role and some property/object (but this is not very likely). What name does your new role has? You can undo the transaction and then should be able to work again.
Next thing I knew, no more getting to the security tab. When I
An alternative would be to patch "AccessControl/Role.py:106" to catch and handle the TypeError appropriately. I would go for the first solution.
... (Object: permission_settings) File C:\PROGRA~1\Zope\lib\python\AccessControl\Role.py, line 111, in permission_settings (Object: Zope) File C:\PROGRA~1\Zope\lib\python\AccessControl\Role.py, line 106, in <lambda> TypeError: (see above)
Dieter
participants (2)
-
Benjamin Eastwood -
Dieter Maurer