[Zope] Simple problem (probably)...
Andy McKay
andym@ActiveState.com
Thu, 15 Feb 2001 13:47:08 -0800
You have idented your python correctly havent you? It should be
def hello(name='world'):
return "Hello %s" % name
--
Andy McKay.
----- Original Message -----
From: <Jason.Jones@awl.com>
To: <zope@zope.org>
Sent: Thursday, February 15, 2001 1:30 PM
Subject: [Zope] Simple problem (probably)...
> I am new to Zope and attempting to use an external method as described in
the zope book, unfortunately I keep getting the following error:
>
> Traceback (innermost last):
> File E:\AWPROS~1\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
> File E:\AWPROS~1\lib\python\ZPublisher\Publish.py, line 187, in publish
> File E:\AWPROS~1\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
> File E:\AWPROS~1\lib\python\ZPublisher\Publish.py, line 171, in publish
> File E:\AWPROS~1\lib\python\ZPublisher\mapply.py, line 160, in mapply
> (Object: manage_addExternalMethod)
> File E:\AWPROS~1\lib\python\ZPublisher\Publish.py, line 112, in
call_object
> (Object: manage_addExternalMethod)
> File E:\AWPROS~1\lib\python\Products\ExternalMethod\ExternalMethod.py,
line 131, in manage_addExternalMethod
> File E:\AWPROS~1\lib\python\Products\ExternalMethod\ExternalMethod.py,
line 179, in __init__
> (Object: hello)
> File E:\AWPROS~1\lib\python\Products\ExternalMethod\ExternalMethod.py,
line 202, in manage_edit
> (Object: hello)
> File E:\AWPROS~1\lib\python\Products\ExternalMethod\ExternalMethod.py,
line 209, in getFunction
> (Object: hello)
> File E:\AWPROS~1\lib\python\App\Extensions.py, line 217, in getObject
> (Info: ('E:\\awprosite\\Extensions\\Example.py', 'Example'))
> SyntaxError: (see above)
>
> The extension is indeed named "Example.py" and the method is the example
from the book:
>
> def hello(name='world')
> return "Hello %s" % name
>
> I'm using Zope 2.3 on Windows NT.
>
> Any ideas?
>
> Thanks,
>
> Jason Jones
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>