Igor Leturia writes:
I want to call a ZSQLMethod from a Python Script. In Zope.org, I couldn't find a specific how-to on the subject, but accidentally I found some other how-to's in which there are examples that use ZSQLMethods from Python scripts. It seemed very easy, so I tried it that way:
res = context.mysqlmethod()
It gives an error message, 'resource not found'. Both the script and the sql method are in the same folder. What's going wrong? .... Dieter Maurer writes:
If it does not help, the precise error message (Error Type, Error Value and traceback) is necessary to help...
'container' doesn't work either. As for the error type and value, I don't know, this is the message I get:
Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again.
Please run your Zope in debug mode (start it with "-D" option).
It will give you better error messages and tracebacks.
This is the traceback when running in debug mode: Traceback (innermost last): File C:\Intranet\lib\python\ZPublisher\Publish.py, line 223, in publish_module File C:\Intranet\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\Intranet\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File C:\Intranet\lib\python\ZPublisher\Publish.py, line 173, in publish File C:\Intranet\lib\python\ZPublisher\HTTPResponse.py, line 308, in setBody File C:\Intranet\lib\python\ZPublisher\HTTPResponse.py, line 547, in notFoundError NotFound: (see above)