[Zope-dev] A couple of possible Python Scripts bugs
Itai Tavor
itai@optusnet.com.au
Fri, 15 Dec 2000 18:07:03 +1100
First, when trying to add a Python Script, I sometimes get:
Error Type: AttributeError
Error Value: tx
Traceback (innermost last):
File /opt/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
File /opt/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 187, in publish
File /opt/Zope-2.2.2-linux2-x86/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
File /opt/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 171, in publish
File /opt/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_addPythonScript)
File /opt/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_addPythonScript)
File /opt/Zope/lib/python/Products/PythonScripts/PythonScript.py,
line 122, in manage_addPythonScript
AttributeError: (see above)
Even if there is no object named 'tx' anywhere.
Second, I have a ZClass with two propertysheets. The property
'domains' is on the 2nd sheet. This Python Method:
<params>self</params>
return self.domains
returns the value of domains. But this Python Script:
<params></params>
return container.domains
returns AttributeError.
This does not occur if I try to read a property on the first
propertysheet in the ZClass. Also, getProperty('domains') works in
the Python Script. And this Python Script:
<params>self</params>
return self.domains
Returns the same AttributeError. Cue Twilight Zone music?
--
Itai Tavor "Je sautille, donc je suis."
C3Works itai@c3works.com - Kermit the Frog
"If you haven't got your health, you haven't got anything"