[If this is better suited to zope-dev then feel free to reply there and cc me] Hi, I am having some problems with ZPublisher.Client. I am using that module to make a bridge between e-mail and Zope (its practically done except for these problems and packaging it). 1. Problem I have stated in previous posts: I cannot send a list of attachments. In other words, ZPublisher.Client.call(url, att=[open(file1), open(file2)]) will not send the Right Stuff. I guess I would like to hear whether this is a bug in DC's opinion (its a pretty obscure situation), and if so would it probably be fixed by 2.0.0. Otherwise I will design around the problem. 2. Sending to Zope 2.0.0b4 server doesn't work at all. I can use ZPublisher.Client.call to send data correctly to a normal Python CGI script, including files, but when I tried the same to a Zope server, the client hangs. Actually the server also crashed one time. I am running it through ZServer not Apache. I can upload files through the browser just fine. Can anyone else duplicate this problem? Help me out, so you can use Zope to handle your e-mail! -Tony Lownds
Tony Lownds wrote:
[If this is better suited to zope-dev then feel free to reply there and cc me]
Hi,
I am having some problems with ZPublisher.Client. I am using that module to make a bridge between e-mail and Zope (its practically done except for these problems and packaging it).
1. Problem I have stated in previous posts: I cannot send a list of attachments.
In other words, ZPublisher.Client.call(url, att=[open(file1), open(file2)]) will not send the Right Stuff. I guess I would like to hear whether this is a bug in DC's opinion (its a pretty obscure situation), and if so would it probably be fixed by 2.0.0. Otherwise I will design around the problem.
2. Sending to Zope 2.0.0b4 server doesn't work at all.
I can use ZPublisher.Client.call to send data correctly to a normal Python CGI script, including files, but when I tried the same to a Zope server, the client hangs. Actually the server also crashed one time. I am running it through ZServer not Apache. I can upload files through the browser just fine. Can anyone else duplicate this problem?
Help me out, so you can use Zope to handle your e-mail!
This works for me: A DTML method in the root folder named 'DD' contains: <!--#var standard_html_header--> <dtml-in stuff> <dtml-var sequence-item> </dtml-in> <!--#var standard_html_footer--> (Note that that you can mix DTML sytax for no good reason). If I call it like:
Client.call('http://aldous:10080/DD', stuff=['one', 'two'])
It works dandy: Client.call('http://aldous:10080/DD', stuff=['one', 'two']) (<mimetools.Message instance at 80d39e0>, '<HTML><HEAD><TITLE>Zope</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">\012\012 one\012 two\012\012<p><a href="http://www.zope.org/Credits"><img src="http://aldous/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope"></a></p>\012</BODY></HTML>')
Note that it iterated over the 'stuff' list and rendered two items, 'one' and 'two'. Is the thing you're calling expecting 'att' to be a sequence? -Michel
-Tony Lownds
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
My problems are with sending files, multipart/form-data stuff. When using Netscape, sending a file to a Zope2 server works. sending two files under the same name to a regular CGI works. When using ZPublisher.CLient, sending a file to a regular CGI works fine. sending a file to a Zope2 (b4,ZServer) server hangs the client. sending two files under the same name to a regular CGI doesnt work - the data in the file does not get there. (details of that are in a previous post) I had not realized that sending regular parameters to a Zope2 client worked, though - I did all my initial testing of "zmailclient" using a regular CGI, and now I'm working on DTML docs to do stuff with uploaded email info. Looking in the code for Client.py, two very different code paths are taken depending on whether its going to be a multipart-mime request or not. If it is, then the code uses the socket module directly (instead of httplib) and hangs on "reply=line.readline()" (line 287 or so). It takes two ctrl-C's to break when its hung. Hope that helps. -Tony Lownds On Mon, 16 Aug 1999, Michel Pelletier wrote:
This works for me:
A DTML method in the root folder named 'DD' contains:
<!--#var standard_html_header-->
<dtml-in stuff> <dtml-var sequence-item> </dtml-in>
<!--#var standard_html_footer-->
(Note that that you can mix DTML sytax for no good reason).
If I call it like:
Client.call('http://aldous:10080/DD', stuff=['one', 'two'])
It works dandy:
Client.call('http://aldous:10080/DD', stuff=['one', 'two']) (<mimetools.Message instance at 80d39e0>, '<HTML><HEAD><TITLE>Zope</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">\012\012 one\012 two\012\012<p><a href="http://www.zope.org/Credits"><img src="http://aldous/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope"></a></p>\012</BODY></HTML>')
Note that it iterated over the 'stuff' list and rendered two items, 'one' and 'two'.
Is the thing you're calling expecting 'att' to be a sequence?
-Michel
-Tony Lownds
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Tony Lownds wrote:
My problems are with sending files, multipart/form-data stuff.
When using Netscape,
sending a file to a Zope2 server works. sending two files under the same name to a regular CGI works.
When using ZPublisher.CLient,
sending a file to a regular CGI works fine. sending a file to a Zope2 (b4,ZServer) server hangs the client.
If uploading one file with ZPublisher.Client fails, then this is a bug and should be reported to the Collector in great detail: http://www.zope.org/Collector Although this is probably not a "showstopper" bug, it should be looked at to see if it leads to a deeper problem.
sending two files under the same name to a regular CGI doesnt work - the data in the file does not get there. (details of that are in a previous post)
I had not realized that sending regular parameters to a Zope2 client worked, though - I did all my initial testing of "zmailclient" using a regular CGI, and now I'm working on DTML docs to do stuff with uploaded email info.
Did your problem go away when you tried sending regular parameters? -Michel
If uploading one file with ZPublisher.Client fails, then this is a bug and should be reported to the Collector in great detail:
Ok sure
Did your problem go away when you tried sending regular parameters?
-Michel
Yes, but so did my solution. -Tony Lownds
participants (2)
-
Michel Pelletier -
Tony Lownds