>>Have you tried what I posted before? I mean try to add to your script:
>>container.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
>>
>>I'm curious if this changes anything.
yes i test this and then the header is everytime 200 OK - so no problem. But
i test this only with my 2 lines of
Chris Withers wrote at 2006-11-27 16:16 +:
> ...
>Moral of the story: if you want sane things to happen, make sure your
>script returns a string output.
In fact, an empty string would result in the same behaviour.
Thus, the moral should be: make your your script does not return
a Python fals
> This script is the part of the devil ;) It has produce the double emails, i
> have cut some lines codes to get it faster to understand.
Have you tried what I posted before? I mean try to add to your script:
container.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
I'm curious if this ch
>>> context.MailHost.send('bodytext', "[EMAIL PROTECTED]",
>>"[EMAIL PROTECTED]",
>>> 'subj'+str(i))
>>> ###
>>> This script produces: HTTP/1.1 204 No Content
>>
>>Moral of the story: if you want sane things to happen, make sure your
>>script returns a string output.
>>
>>Otherwise you risk ti
Christian Steinhauer wrote:
http://www.blunck.se/iehttpheaders/iehttpheaders.html
What a nice tool. Now more debugging with some interesting results.
###
for i in range(2):
context.MailHost.send('bodytext', "[EMAIL PROTECTED]", "[EMAIL PROTECTED]",
'subj'+str(i))
###
This script produces:
> The third script has no output on the screen too but works fine and
> gives HTTP Code 200 back. Can you tell me why he do this?
This is because of call to ZPT in your third script. ZPT call sets
RESPONSE HTTP headers with content/type='text/html'. Try this:
for i in range(2):
context.MailHost.
>>
>>http://www.blunck.se/iehttpheaders/iehttpheaders.html
>>
What a nice tool. Now more debugging with some interesting results.
###
for i in range(2):
context.MailHost.send('bodytext', "[EMAIL PROTECTED]", "[EMAIL PROTECTED]",
'subj'+str(i))
###
This script produces: HTTP/1.1 204 No Content
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 25 Nov 2006, at 00:08, Christian Steinhauer wrote:
localhost- christian [24/Nov/2006:23:48:27 +0200] "GET
/VirtualHostBase/https/dev.***.de:443/VirtualHostRoot/Christian/
rangeEMAIL.p
y HTTP/1.1" 204 210 "" "Mozilla/4.0 (compatible; MSIE 6.0; Wi
- Original Message -
From: "Christian Steinhauer" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 24, 2006 6:08 PM
Subject: Re: [Zope] error with simple python script loop
now i shrink my test script to one line ;)
###
for i in range(2):
context.MailHost.send(
now i shrink my test script to one line ;)
###
for i in range(2):
context.MailHost.send('bodytext', "[EMAIL PROTECTED]", "[EMAIL PROTECTED]",
'subj'+str(i))
###
The error occured with IE, with Firefox i cant replicate the error. Here is
the output of the Z2.log when calling the script over U
Christian Steinhauer wrote at 2006-11-24 13:12 +0100:
>I have an problem with this little script. The script is in the zope
>file structure and it is an -Script (Python)-
>
>The script should send 2 emails over the mailhost, but it sends 4
>emails. I have test this with maildrophost product too, s
On Fri, Nov 24, 2006 at 02:46:25PM +0100, Christian Steinhauer wrote:
> ... i cant use pdb on zopeĀ“s python script i think?
Normally true, but you can google for Chris Withers' "zdb" product
which allows debugging from scripts very nicely.
--PW
___
Zo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 24 Nov 2006, at 14:38, Jonathan wrote:
I have never written a python script that did not have a 'return'
statement. I don't know if it is mandatory or not. I usually use
python scripts as subroutines/functions and I always have a return
stat
>
> Hi Jonathan, thanks for taking care of the problem. I have done the self test
> you do with the list. But everytime when something is written at last line,
> example return 'eof' (My example in the topic) the error did not occured - so
> the list gives me 2 and i will get 2 emails.
>
So
>>I tried to reproduce your '4 iteration' problem on my Zope 2.9.2
>>installation, but even by removing the 'return' statement I
>>still got 2 loop
>>iterations (and 2 emails).
>>
>>I have never written a python script that did not have a
>>'return' statement.
>>I don't know if it is mandatory
- Original Message -
From: "Christian Steinhauer" <[EMAIL PROTECTED]>
To: "Jonathan" <[EMAIL PROTECTED]>;
Sent: Friday, November 24, 2006 8:19 AM
Subject: Re: [Zope] error with simple python script loop
I just cut and pasted your code into a pytho
>>I just cut and pasted your code into a python script on my
>>Zope installation
>>(2.9.2) and it worked as expected (ie. 2 emails sent). So
>>something is
>>pooched in your installation.
>>
>>A quick way to check to see if your script is looping more
>>than you expect
>>is to do something li
- Original Message -
From: "Christian Steinhauer" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 24, 2006 7:12 AM
Subject: [Zope] error with simple python script loop
I have an problem with this little script. The script is in the zope
file structure and it is an
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 24. November 2006 13:39:07 +0100 Christian Steinhauer
<[EMAIL PROTECTED]> wrote:
>
>
>
>>> As I said in the tracker, no one can help you if you don't
>>> actually give us the full traceback and exception that you got.
>
> There is no traceba
>>As I said in the tracker, no one can help you if you don't
>>actually give us the full traceback and exception that you got.
There is no traceback, i got no error - thats why i have post it into
bug tracker. I spoke to many people but no one can tell me why it
occured. The most said that it
> The script should send 2 emails over the mailhost, but it sends 4
> emails. I have test this with maildrophost product too, same problem. I
> have test it on Zope 2.10.0 and Zope 2.64. The problem is the same -
> everytime.
>
How do you call this script? Directly (via URL)? Or it is called
b
Christian Steinhauer wrote:
This script produce the error:
start
for i in range(2):
subj = str(i) + ' range python'
context.MailHost.send('range test with python', "[EMAIL PROTECTED]",
"[EMAIL PROTECTED]", subj)
end
As I said in the tracker, no one can help you if you d
I have an problem with this little script. The script is in the zope
file structure and it is an -Script (Python)-
The script should send 2 emails over the mailhost, but it sends 4
emails. I have test this with maildrophost product too, same problem. I
have test it on Zope 2.10.0 and Zope 2.64. T
23 matches
Mail list logo