I can't readily explain why this is the case, but it looks like either a) REQUEST is not being passed in, or b) REQUEST is None The following method: def dwName(self,REQUEST=None): if REQUEST is not None: return "%s" % REQUEST['AUTHENTICATED_USER'] else: return "" will run. It will produce the desired result if called directly (by going to the URL of the method). It does not seem to produce anything when called from a DTML Method. And that's as much as I know :) Kevin On Tue, Feb 16, 1999 at 01:42:21PM -0600, David Wagle wrote: ,----- | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | | Can someone tell me what I'm doing wrong? | | I have the VERY simple external methods test.xm and test2.xm | defined. | | They are: | | from DateTime import DateTime | | def dwTime(self): | t=DateTime() | return DateTime.timeTime(t) | | def dwName(self,REQUEST=None): | return "%s" % REQUEST['AUTHENTICATED_USER'] | | They both work fine from the Zope/manage screen using the | 'try-it' tab. | | When I use them in a test file: | | <!--#var standard_html_header--> | | <!--#var test.xm--> | <!--#var test2.xm--> | | <!--#var standard_html_footer--> | | The first (<!--#var test.xm-->) works just fine. | but the addition of the second, causes the following | run-time error: | | | | | Traceback (innermost last): | File /usr/local/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 879, in publish_module | File /usr/local/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 595, in publish | (Info: /test_area/test1) | File /usr/local/Zope-1.9.0-src/lib/python/OFS/Document.py, line 181, in __call__ | (Object: test1) | File /usr/local/Zope-1.9.0-src/lib/python/OFS/Document.py, line 177, in __call__ | (Object: test1) | File /usr/local/Zope-1.9.0-src/lib/python/DocumentTemplate/DT_String.py, line 514, in __call__ | (Object: test1) | File /usr/local/Zope-1.9.0-src/lib/python/Products/ExternalMethod/ExternalMethod.py, line 266, in __call__ | (Object: Item) | (Info: ((), {}, (None,))) | TypeError: (see above) | | | | | - --------------------------------------------- | A computer without Microsoft products is like | a dog without bricks chained to its head | - --------------------------------------------- | -----BEGIN PGP SIGNATURE----- | Version: PGP for Personal Privacy 5.0 | Comment: Processed by Mailcrypt 3.5.1, an Emacs/PGP interface | Charset: noconv | | iQA/AwUBNsnKG9tGhckXZmDjEQJJpwCfeziCLyeaVw0/h3FfcAE2JJ3uQrQAoNbJ | E+U2HC4yTS/aZQmJb0XO6YLk | =ApHz | -----END PGP SIGNATURE----- | | _______________________________________________ | Zope maillist - Zope@zope.org | http://www.zope.org/mailman/listinfo/zope `----- -- Kevin Dangoor UUnet Technologies kid@ans.net / 734-214-7349