Weird Problem with Script(Python)
Hi, I've got a Script(Python) which is a method of a ZClass, now if I call this script using an instance of the ZClass I get: Error Type: IndexError Error Value: string index out of range The script is called from a form, which set's some variables in the request. The script itself also has parameters which default to None and then checks if they are set, so that these settings override the request-variables. Anyway, even If I comment out the whole code I get this weird error. Here is the PageTemplate snippet containing the form. How can I track down this problem? I really have no Idea how to get to the point where this Error comes from <form method="POST" action="vergeben" tal:attributes="action string:Arbeiten/${request/arbeit}/vergeben" tal:condition="python:Attribute.getProperty('Status') == 'zu vergeben'"> <input type="hidden" name="DestinationUrl" value="index_html" tal:attributes="value python:here.absolute_url()"> <table border="0"> <tr> <td><span class="Arbeit">Name des Studenten:</span></td> <td><input size="40" type="text" name="Studentname" value=""></td> </tr> <tr> <td><span class="Arbeit">Email des Studenten:</span> </td> <td><input size="50" type="text" name="Studentemail" value=""> </tr> </table> <input type="submit" name="Vergeben" value="Arbeit vergeben"> </form> Sorry for the german text, but I don't think that it is a problem. Andreas -- Do nothing unless you must, and when you must act -- hesitate.
Andreas Pakulat wrote:
Error Type: IndexError Error Value: string index out of range
Anyway, even If I comment out the whole code I get this weird error.
be aware of http://collector.zope.org/Zope/945 -- Jamie Heilman http://audible.transient.net/~jamie/ "I was in love once -- a Sinclair ZX-81. People said, "No, Holly, she's not for you." She was cheap, she was stupid and she wouldn't load -- well, not for me, anyway." -Holly
Andreas Pakulat wrote at 2003-6-25 00:33 +0200:
I've got a Script(Python) which is a method of a ZClass, now if I call this script using an instance of the ZClass I get:
Error Type: IndexError Error Value: string index out of range ... How can I track down this problem?
Always! When you get an exception, you analyse the traceback... It tells you where the exception has been raised. When you do not understand the traceback, you post it together with your problem report.
I really have no Idea how to get to the point where this Error comes from
The traceback will tell you... Dieter
On 27.Jun 2003 - 00:40:43, Dieter Maurer wrote:
Andreas Pakulat wrote at 2003-6-25 00:33 +0200:
I've got a Script(Python) which is a method of a ZClass, now if I call this script using an instance of the ZClass I get:
Error Type: IndexError Error Value: string index out of range ... How can I track down this problem?
Always!
When you get an exception, you analyse the traceback... It tells you where the exception has been raised.
When you do not understand the traceback, you post it together with your problem report.
I found the error, in the error_log in /, but I had to do a restart of the server and then redo what led to the error. These Error's were not in the error_log in the first place and I did not had the stdout/stderr of the start-script written into a logfile. Andreas -- You need more time; and you probably always will.
participants (3)
-
Andreas Pakulat -
Dieter Maurer -
Jamie Heilman