[Zope] Re: zope 3 invisibility

2006-09-12 Thread Simon Michael
For the record, I found this thread illuminating and entirely on-topic for 
this list. Thanks Carlos!


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How can I get a listing of all objects in the Zope 2.62 ZODB?

2006-09-12 Thread Lennart Regebro

On 9/12/06, Mark, Jonathan (Integic) <[EMAIL PROTECTED]> wrote:

In Oracle it is easy to get a listing of everything
that is in the Oracle database. One simply queries the
system view dba_objects.

Is there anything similar for the Zope 2.62 ZODB?


ZODB is an hierarchical object database. So, yes, there is and no there isn't.
You can't just make a query and get all the data, the data is stored as objects.

On the other hand, getting tha data is dead easy, although you don't
make a query. You just write python. For example, to get all the
subobjects for a particular object, you write

subobjects = the_object.objectValues()

Tada!

Do that recursively, and you pretty much get all the objects you would
be interested in. Then you need to understand each object type, but
that's another thing. ;-)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Paul Winkler
On Tue, Sep 12, 2006 at 06:58:36PM +0200, Willi Langenberger wrote:
> I found it very useful to log every xml-rpc call (call and return
> value). For this we have patched ZPublisher/xmlrpc.py (and one line in
> ZPublisher/HTTPRequest.py). See attachment (tested against 2.9.3).

(snip)
Thanks!  I may give this a try.

FWIW, I've been toying with adding a @log decorator to my methods,
along the lines of the logger example at http://soiland.no/software/decorator
but i'm having some pain - will report back if i get it working.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Paul Winkler
On Wed, Sep 13, 2006 at 03:04:48AM +1000, Andrew Milton wrote:
> +---[ Paul Winkler ]--
> | On Wed, Sep 13, 2006 at 02:39:14AM +1000, Andrew Milton wrote:
> | > +---[ Paul Winkler ]--
> | > | Been doing web services (XML-RPC) stuff lately.
> | > | What suggestions do people have for troubleshooting a zope-based
> | > | XML-RPC application?
> | > 
> | > When debugging;
> | > o Raise an exception from python scripts, you can include some info in it.
> | 
> | OK, but when we're dealing with a production system, I can't raise 
> | random exceptions just to gather information.
> 
> That's why you have a development instance right? d8)

Yes. But in real life you sometimes have an "oh s**t" moment
on production.  That isn't the case for me today, but I'm trying
to plan ahead :)

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Custom authentication page...

2006-09-12 Thread Steve

Olavo Santos wrote:
Is this a bug with "Cookie Crumbler" (version 0.3 downloaded from 
zope.org used against Zope 2.9.4, python 2.4.3, win32)?


That is a really old version.
Go here: http://hathawaymix.org/Software/CookieCrumbler
Upgrade to version 1.2. :-)
  

Sorted; Thanks!

I had been using the version published on zope.org, as opposed to the 
one on hathawaymix.org - I'd expected the version hosted on the main 
zope site to at least work... :-)  The comments do mention 
hathawaymix.org, but don't give that full URL - and 
http://hathawaymix.org/ doesn't take me somewhere useful to me... )


Steve

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Paul Winkler
On Tue, Sep 12, 2006 at 07:40:15PM +0200, Andreas Jung wrote:
> Ethereal aka Wireshark how it is called now works perfectly for any kind
> of network analysis like that. It has a functionality "Follow TCP stream" 
> and is able to decode nearly every protocol.

Oooh, that looks really really useful. Thanks!
Found it at
http://www.wireshark.org/faq.html

Unlike tcpdump, it doesn't require pointing clients to a different
port (or running on the server and restarting the server on
a different port).

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How can I get a listing of all objects in the Zope 2.62 ZODB?

2006-09-12 Thread Dieter Maurer
Mark, Jonathan (Integic) wrote at 2006-9-12 11:26 -0400:
>In Oracle it is easy to get a listing of everything
>that is in the Oracle database. One simply queries the
>system view dba_objects.
>
>Is there anything similar for the Zope 2.62 ZODB? I
>have been using Squishdot at goodbyejim.com for years.
>I still don't understand it. I would love to be able
>to see everything that it dumps into the ZODB.

In modern ZODB versions (I think ZODB 3.6 and above),
there is an iterator which allows you to iterate over
all objects in the ZODB.

It main use case is to perform migrations between major updates.
But, if you know how to "list" your objects intelligently (this is much more
difficult than with Oracle where all objects have a strict schema),
you definitely can do this as well (but I doubt, you will be happy).

>I understand that one can look at the Squishdot source
>to find out. But it ought to be possible to query the
>ZODB directly and observe all of the objects that are
>in it.

The ZODB level is *very* *very* low!
You do *NOT* want to work on this level when you have an alternative...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] sending updates with zope.

2006-09-12 Thread Dieter Maurer
Samuele Giovanni Tonon wrote at 2006-9-12 12:49 +0200:
>i have this problem which is related to zope.
>we sell a tool inside zope that we install on a machine that stay
>at our customer.
>
>We need to find a easy but powerful way to update the tool if there
>are bugs or new features .
>
>after some research i've found zope synchronizer which is quite good
>but it miss some function (i.e. checking the file instead of just
>checking mtime ) and i would like if there are other products or solutions

You may search the mailing list archive for threads about
synchronization between development and production environments.

The concrete approach depends on how your "tool" is implemented.
If it is file system based, then you can synchronize by replacing
the code with file system means (installing an archive).
If it is ZODB based, the "ZSyncer" may help you.
In some cases, you will need a hybrid approach.
And in the most complex cases, an intelligent installation
script will be necessary to make the necessary adaptions...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Custom authentication page...

2006-09-12 Thread Olavo Santos
From: "Steve" <[EMAIL PROTECTED]>
Sent: Tuesday, 12 de September de 2006 18:14

Hello.

> Is this a bug with "Cookie Crumbler" (version 0.3 downloaded from 
> zope.org used against Zope 2.9.4, python 2.4.3, win32)?

That is a really old version.

Go here: http://hathawaymix.org/Software/CookieCrumbler

Upgrade to version 1.2. :-)

Best regards,

@787, Nbk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Custom authentication page...

2006-09-12 Thread Steve

David H wrote:
I've read that I should use the "Cookie Crumbler" product... but 
after I've added this to the folder that I intend to protect, I click 
on cookie_authentication (the default name for the "Cookie Crumbler" 
object) and I get the following error message:
Thats a weird one ...  but cookie crumbler is great to get  custom 
login forms

It looked as if it should be... :-)
Did you try deleting it and adding another (cookie_authentication 
object)**  Maybe you added a property thats non-existent? (login page 
id or something?)
I tried that - I even tried installing a fresh version of Zope and 
creating a new instance...  I followed some instructions:


   http://www.zopelabs.com/cookbook/1073516045

My experiences started to differ when I got a  cookie_authentication 
instead of a login object...  I was unable to display the properties tab 
for cookie_authentication (step 8) as that generates the error...

you can produce a fuller error traceback
If necessary add
  
to your standard_error_message (if using dtml) for a clearer error 
expression


That generates:

Traceback (innermost last):

   * Module ZPublisher.Publish, line 115, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 41, in call_object
   * Module Products.CookieCrumbler.utils, line 115, in
 manage_propertiesForm
   * Module Shared.DC.Scripts.Bindings, line 311, in __call__
   * Module Shared.DC.Scripts.Bindings, line 346, in _bindAndExec
   * Module Shared.DC.Scripts.Bindings, line 1, in ?
   * Module Shared.DC.Scripts.Bindings, line 265, in _getContext



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Andreas Jung



--On 12. September 2006 12:34:38 -0400 Paul Winkler <[EMAIL PROTECTED]> 
wrote:



Been doing web services (XML-RPC) stuff lately.
What suggestions do people have for troubleshooting a zope-based
XML-RPC application?

Access and trace logs are totally useless, since even the method name is
hidden in the POST payload, so I feel like I'm flying blind; when a
client developer tells me he gets occasional hangs, I have no idea what
kind of request triggers the hang.




Ethereal aka Wireshark how it is called now works perfectly for any kind
of network analysis like that. It has a functionality "Follow TCP stream" 
and is able to decode nearly every protocol.


-aj

pgpDpJhru2u5h.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Custom authentication page...

2006-09-12 Thread David H




Steve wrote:
I'm just
starting to look at Zope as a potential platform to implement a simple
authenticated web site... however I do not want to face users with the
standard web-browser dialogue, but rather my own log-in page.  I've
established how to restrict access based upon permissions etc... and
I'm able to set/reset cookies based a form submission - but do not see
how to integrate an HTML login page with the standard Zope security.
  
  
I've read that I should use the "Cookie Crumbler" product... but after
I've added this to the folder that I intend to protect, I click on
cookie_authentication (the default name for the "Cookie Crumbler"
object) and I get the following error message:
  
--
  
  
An error was encountered while publishing this resource.
  
  
*Error Type: AttributeError*
  
*Error Value: aq_parent*
  
  
--
  
  
Is this a bug with "Cookie Crumbler" (version 0.3 downloaded from
zope.org used against Zope 2.9.4, python 2.4.3, win32)?
  
Am I barking up the wrong tree in hoping to have a slick-looking
"logon" page?  Is this something commonly done using Zope?  Is "Cookie
Crumbler" the right product?  Would I be better hand-coding this
myself?
  
  
  

Steve,
Thats a weird one ...  but cookie crumbler is great to get  custom
login forms
Did you try deleting it and adding another (cookie_authentication
object)  Maybe you added a property thats
non-existent? (login page id or something?)

you can produce a fuller error traceback 

If necessary add
  
to your standard_error_message (if using dtml) for a clearer error
_expression_








___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Custom authentication page...

2006-09-12 Thread Andreas Jung



--On 12. September 2006 18:14:39 +0100 Steve <[EMAIL PROTECTED]> wrote:


I'm just starting to look at Zope as a potential platform to implement a
simple authenticated web site... however I do not want to face users with
the standard web-browser dialogue, but rather my own log-in page.  I've
established how to restrict access based upon permissions etc... and I'm
able to set/reset cookies based a form submission - but do not see how to
integrate an HTML login page with the standard Zope security.

I've read that I should use the "Cookie Crumbler" product... but after
I've added this to the folder that I intend to protect, I click on
cookie_authentication (the default name for the "Cookie Crumbler" object)
and I get the following error message:
--

An error was encountered while publishing this resource.

*Error Type: AttributeError*
*Error Value: aq_parent*



Such a snippet is worthless for getting help. You need to provide the full 
traceback.


-aj

pgpKPAx1UYvcO.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] passing *args to external method

2006-09-12 Thread Andreas Jung



--On 12. September 2006 18:26:20 +0100 Alan <[EMAIL PROTECTED]> wrote:




it returns values of arg1 and arg2. But my problem is that the number
args cannot be fixed since such arguments depends on other page.


All form parameter are available from the REQUEST.form.
self.REQUEST gives you the REQUEST object inside an external method. 'form'
is basically a dict-like object so you can use the standard Python methods
for dicts for doing whatever you want.

-aj

pgpOdoufcM8QR.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] passing *args to external method

2006-09-12 Thread Alan

Hi List!

I've been trying without success to pass from a form in ZPT to an
external method an undefined list of parameters (*args).

An example:

def external_method(var_fix,*args):
  return 'Vals',var_fix,args
...
file _sub_html_:










returns typed value for var_fix and () for args. However, if I do:

def external_method(var_fix,arg1,arg2,*args):
 return "Vals",var_fix,arg1,arg2,args

it returns values of arg1 and arg2. But my problem is that the number
args cannot be fixed since such arguments depends on other page.

I hope one can understand it. And I'd appreciate very much any attention.
Many thanks in advance.

Cheers,
Alan
--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28<<

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Custom authentication page...

2006-09-12 Thread Steve
I'm just starting to look at Zope as a potential platform to implement a 
simple authenticated web site... however I do not want to face users 
with the standard web-browser dialogue, but rather my own log-in page.  
I've established how to restrict access based upon permissions etc... 
and I'm able to set/reset cookies based a form submission - but do not 
see how to integrate an HTML login page with the standard Zope security.


I've read that I should use the "Cookie Crumbler" product... but after 
I've added this to the folder that I intend to protect, I click on 
cookie_authentication (the default name for the "Cookie Crumbler" 
object) and I get the following error message:

--

An error was encountered while publishing this resource.

*Error Type: AttributeError*
*Error Value: aq_parent*

--

Is this a bug with "Cookie Crumbler" (version 0.3 downloaded from 
zope.org used against Zope 2.9.4, python 2.4.3, win32)?
Am I barking up the wrong tree in hoping to have a slick-looking "logon" 
page?  Is this something commonly done using Zope?  Is "Cookie Crumbler" 
the right product?  Would I be better hand-coding this myself?



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Andrew Milton
+---[ Paul Winkler ]--
| On Wed, Sep 13, 2006 at 02:39:14AM +1000, Andrew Milton wrote:
| > +---[ Paul Winkler ]--
| > | Been doing web services (XML-RPC) stuff lately.
| > | What suggestions do people have for troubleshooting a zope-based
| > | XML-RPC application?
| > 
| > When debugging;
| > o Raise an exception from python scripts, you can include some info in it.
| 
| OK, but when we're dealing with a production system, I can't raise 
| random exceptions just to gather information.

That's why you have a development instance right? d8)

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Willi Langenberger
According to Paul Winkler:
> Been doing web services (XML-RPC) stuff lately.
> What suggestions do people have for troubleshooting a zope-based
> XML-RPC application?
> 
> Access and trace logs are totally useless, since even the method name is
> hidden in the POST payload, so I feel like I'm flying blind; when a
> client developer tells me he gets occasional hangs, I have no idea what
> kind of request triggers the hang.
> 
> I may end up sprinkling my code with a lot more logging calls than I'm used
> to.  Any other suggestions?

I found it very useful to log every xml-rpc call (call and return
value). For this we have patched ZPublisher/xmlrpc.py (and one line in
ZPublisher/HTTPRequest.py). See attachment (tested against 2.9.3).

The log entries look like that:

  Sep 10 06:58:40 bach-s10 xmlrpc id=-177841652, client=137.208.89.23,  \
   user=stupl, inst=bach-s10.wu-wien.ac.at:10082, path=/bach/stupl/RPC, \
   call=get_adreptl3(2002,)

  Sep 10 06:58:40 bach-s10 xmlrpc id=-177841652, client=137.208.89.23,  \
   user=stupl, inst=bach-s10.wu-wien.ac.at:10082, time=88.27ms, out-ok, \
   ret=[('E', 19007, None, 7066351, 1, None), ('E', 19010, None, ...



\wlang{}

-- 
[EMAIL PROTECTED]Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria

-included file follows-

--- xmlrpc.py.ori   2006-05-12 13:53:45.0 +0200
+++ xmlrpc.py   2006-09-12 18:52:39.094041280 +0200
@@ -21,11 +21,56 @@
 
 import re
 import sys, types
+import time
 from HTTPResponse import HTTPResponse
 import xmlrpclib
+import logging
+logger = logging.getLogger('event.xmlrpc')
+logger.setLevel(logging.INFO)
+hdlr = logging.handlers.SysLogHandler('/dev/log')
+logger.addHandler(hdlr)
 
 from zExceptions import Unauthorized
 
+def log_before(request, method, response):
+# PATH_INFO, or PATH_TRANSLATED ???
+#url = request.base + request.environ['PATH_INFO']
+path = request.environ.get('PATH_INFO')
+host_port = request.environ.get('HTTP_HOST')
+user = request._authUserPW()  # returns (user,pw) tuple or None
+if user:
+user = user[0]
+response.xmlrpc_timestamp = time.time()
+idstring = 'xmlrpc id=%u, client=%s, user=%s, inst=%s' % (
+   id(response), request._client_addr, user, host_port)
+args = '%s' % (request.args,)
+if len(args) > 200:   # syslog line limit: 1024
+sargs = []
+# XXX
+logger.info(
+   "%s, path=%s, call=%s%s" %
+   (idstring, path, method, request.args))
+response.xmlrpc_idstring = idstring
+
+def get_xmlrpc_info(response):
+ts = getattr(response, 'xmlrpc_timestamp', None)
+if ts:
+t = '%.2fms' % ((time.time() - ts) * 1000,)
+else:
+t = '-'
+idstring = (getattr(response, 'xmlrpc_idstring', None) or
+   'xmlrpc %u' % (id(response),))
+return idstring,t
+
+def log_ok(response, ret):
+idstring, t = get_xmlrpc_info(response)
+logger.info("%s, time=%s, out-ok, ret=%s" % (idstring, t, ret))
+
+def log_exception(response, errortext):
+idstring, t = get_xmlrpc_info(response)
+logger.info(
+"%s, time=%s, out-error, exception=%s" % (idstring, t, errortext))
+
 def parse_input(data):
 """Parse input data and return a method path and argument tuple
 
@@ -97,8 +142,11 @@
 
 def setBody(self, body, title='', is_error=0, bogus_str_search=None):
 if isinstance(body, xmlrpclib.Fault):
+txt = str(body)
+log_exception(self, txt)
 # Convert Fault object to XML-RPC response.
-body=xmlrpclib.dumps(body, methodresponse=1, allow_none=True)
+body=xmlrpclib.dumps(body, methodresponse=1, allow_none=True,
+ encoding='iso-8859-1')
 else:
 if type(body) == types.InstanceType:
 # Avoid disclosing private members. Private members are
@@ -117,8 +165,13 @@
 # was a Python None. This is now patched in xmlrpclib to
 # allow Nones nested inside data structures too.
 try:
+ret = '%s' % (body,)
+if len(ret) > 80:
+ret = ret[:80] + '...'
 body = xmlrpclib.dumps(
-(body,), methodresponse=1, allow_none=True)
+(body,), methodresponse=1, allow_none=True,
+encoding='iso-8859-1')
+log_ok(self, ret)
 except:
 self.exception()
 return
@@ -141,6 +194,9 @@
 isinstance(t, types.ClassType) and issubclass(t, Unauthorized)
 ):
 
+txt = '%s: %s' % (t, v) 
+log_exception(self, txt)
+
 return self._real.exception(fatal=fatal, info=info)
 
 # Create an appropriate Fault object. Containing error information
--- HTTPRequest.py.orig 2006-05-12 13:53:45.0 +0200
+++ HTTPRequest.py  2006-06-01 10:23:57.272282896 +0200
@@ -394,6 

Re: [Zope] POST sucks.

2006-09-12 Thread Paul Winkler
On Wed, Sep 13, 2006 at 02:39:14AM +1000, Andrew Milton wrote:
> +---[ Paul Winkler ]--
> | Been doing web services (XML-RPC) stuff lately.
> | What suggestions do people have for troubleshooting a zope-based
> | XML-RPC application?
> 
> When debugging;
> o Raise an exception from python scripts, you can include some info in it.

OK, but when we're dealing with a production system, I can't raise 
random exceptions just to gather information.

> o Use FireFox and use the JavaScript Console to see the traceback returned.

This is a web service. It's not designed to interact with browsers.

> o Don't forget to check /error_log in your Zope instance.

Of course.

Thanks for the suggestions. 
I'll probably have to just bite the bullet and do more manual logging.
Unless somebody has any more ideas...

fwiw, I've also used tcpwatch (http://hathawaymix.org/Software/TCPWatch)
which is really great for inspecting the actual data on the wire,
but again that's not something i can do in production.
 
-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] POST sucks.

2006-09-12 Thread Andrew Milton
+---[ Paul Winkler ]--
| Been doing web services (XML-RPC) stuff lately.
| What suggestions do people have for troubleshooting a zope-based
| XML-RPC application?

When debugging;
o Raise an exception from python scripts, you can include some info in it.
o Use FireFox and use the JavaScript Console to see the traceback returned.
o Don't forget to check /error_log in your Zope instance.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] POST sucks.

2006-09-12 Thread Paul Winkler
Been doing web services (XML-RPC) stuff lately.
What suggestions do people have for troubleshooting a zope-based
XML-RPC application?

Access and trace logs are totally useless, since even the method name is
hidden in the POST payload, so I feel like I'm flying blind; when a
client developer tells me he gets occasional hangs, I have no idea what
kind of request triggers the hang.

I may end up sprinkling my code with a lot more logging calls than I'm used
to.  Any other suggestions?

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How can I get a listing of all objects in the Zope 2.62 ZODB?

2006-09-12 Thread Andreas Jung



--On 12. September 2006 11:26:13 -0400 "Mark, Jonathan (Integic)" 
<[EMAIL PROTECTED]> wrote:



In Oracle it is easy to get a listing of everything
that is in the Oracle database. One simply queries the
system view dba_objects.

Is there anything similar for the Zope 2.62 ZODB? I
have been using Squishdot at goodbyejim.com for years.
I still don't understand it. I would love to be able
to see everything that it dumps into the ZODB.





-aj

pgpBwS4J3qsBa.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] How can I get a listing of all objects in the Zope 2.62 ZODB?

2006-09-12 Thread Mark, Jonathan (Integic)
In Oracle it is easy to get a listing of everything
that is in the Oracle database. One simply queries the
system view dba_objects.

Is there anything similar for the Zope 2.62 ZODB? I
have been using Squishdot at goodbyejim.com for years.
I still don't understand it. I would love to be able
to see everything that it dumps into the ZODB.

I understand that one can look at the Squishdot source
to find out. But it ought to be possible to query the
ZODB directly and observe all of the objects that are
in it.

Jonathan Mark
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dictionary in ZPT

2006-09-12 Thread Martijn Pieters

On 9/12/06, Andreas Jung <[EMAIL PROTECTED]> wrote:

tal:define="dummy python: somedict.update({key:value})"


See, I never manipulate dictionaries in TAL and forgot you had to do
it that way. I gave the wrong answer in my reply.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dictionary in ZPT

2006-09-12 Thread Martijn Pieters

On 9/12/06, Alan <[EMAIL PROTECTED]> wrote:

I started with that:
tal:define="global count python: 0; global data python: {}"
...
and I would like to do something like:
  tal:define="global data['jname'] python: jname"
or
  tal:define="global null python: data['jname']=jname"


Just tal:define="null python:data['jname'] = jname" should do. No need
to make the dummy var global anyway.


But I get only error.


Traceback please. What is the error?


Is there a way of creating and increasing a dict inside Zope template page?


Why do you want to? Use a python script instead, or better still, use
a Zope3-style view.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dictionary in ZPT

2006-09-12 Thread Andreas Jung



--On 12. September 2006 14:16:23 +0100 Alan <[EMAIL PROTECTED]> wrote:


Dears,

I am looking for help.

I want to pass, when submitting a FORM from a page template, dictionary.

I started with that:
tal:define="global count python: 0; global data python: {}"
...
and I would like to do something like:
  tal:define="global data['jname'] python: jname"
or
  tal:define="global null python: data['jname']=jname"



You can perform assignment that way in ZPT. First it is bad style.
You really want to prepare your data inside a PythonScript, call
the script from a ZPT and re-use the data as returned from the script.
If you don't want follow that road, try this:

tal:define="dummy python: somedict.update({key:value})"

-aj


pgpG4Zll9kMQy.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Dictionary in ZPT

2006-09-12 Thread Alan

Dears,

I am looking for help.

I want to pass, when submitting a FORM from a page template, dictionary.

I started with that:
tal:define="global count python: 0; global data python: {}"
...
and I would like to do something like:
 tal:define="global data['jname'] python: jname"
or
 tal:define="global null python: data['jname']=jname"

But I get only error.

Is there a way of creating and increasing a dict inside Zope template page?

Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28<<

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with upgrade from Zope 2.6.1 to Zope 2.9.4

2006-09-12 Thread Andreas Jung



--On 12. September 2006 04:28:12 -0700 yogeen honnavar <[EMAIL PROTECTED]> 
wrote:



>   Module Products.PluginIndexes.PathIndex.PathIndex,
line 124, in index_object
AttributeError: _length



-> doc/FAQ.txt

-aj

--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgpr4JjVoaEGe.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Problem with upgrade from Zope 2.6.1 to Zope 2.9.4

2006-09-12 Thread yogeen honnavar
Dear users,
we migrated a zope application from Zope
2.6.1 to Zope 2.9.4 by copying the Data.fs file to the
new installation. given below is the trace. can anyone
suggest what is the problem and corrective measures.
   we r not able to understand whether the error
occurs at mytestflow or at index object. pls clarify.
thanks and regards
-yogeen

2006-09-12T16:38:47 ERROR Zope.SiteErrorLog
http://mywebsite.com:8080/xxx/yyy/ll/ll_start
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - 
   - URL:
http://mywebsite.com:8080/xxx/yyy/ll/ll_start/manage_main
   - Physical Path: /xxx/yyy/ll/ll_start
  Module DocumentTemplate.DT_String, line 476, in
__call__
  Module DocumentTemplate.DT_Let, line 76, in render
  Module DocumentTemplate.DT_Let, line 76, in render
  Module DocumentTemplate.DT_Let, line 75, in render
  Module DocumentTemplate.DT_Util, line 196, in eval
  - __traceback_info__: mytestflow
  Module , line 1, in 
  Module Products.OpenFlow.openflow, line 379, in
addInstance
  Module Products.OpenFlow.process, line 144, in
addInstance
  Module Products.OpenFlow.instance, line 41, in
addInstance
  Module Products.OpenFlow.instance, line 68, in
manage_addInstance
  Module Products.OpenFlow.instance, line 57, in
safeSetObject
  Module Products.BTreeFolder2.BTreeFolder2, line 446,
in _setObject
  Module zope.event, line 23, in notify
  Module zope.app.event.dispatching, line 66, in
dispatch
  Module zope.component, line 181, in subscribers
  Module zope.component.site, line 89, in subscribers
  Module zope.interface.adapter, line 481, in
subscribers
  Module zope.app.event.objectevent, line 192, in
objectEventNotify
  Module zope.component, line 181, in subscribers
  Module zope.component.site, line 89, in subscribers
  Module zope.interface.adapter, line 481, in
subscribers
  Module OFS.subscribers, line 114, in
dispatchObjectMovedEvent
  Module OFS.subscribers, line 137, in
callManageAfterAdd
  Module Products.ZCatalog.CatalogPathAwareness, line
42, in manage_afterAdd
  Module Products.ZCatalog.CatalogPathAwareness, line
99, in index_object
  Module Products.ZCatalog.ZCatalog, line 567, in
catalog_object
  Module Products.ZCatalog.Catalog, line 360, in
catalogObject
  Module Products.PluginIndexes.PathIndex.PathIndex,
line 124, in index_object
AttributeError: _length



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] sending updates with zope.

2006-09-12 Thread Samuele Giovanni Tonon
hi to all,
i have this problem which is related to zope.
we sell a tool inside zope that we install on a machine that stay
at our customer.

We need to find a easy but powerful way to update the tool if there
are bugs or new features .

after some research i've found zope synchronizer which is quite good
but it miss some function (i.e. checking the file instead of just
checking mtime ) and i would like if there are other products or solutions

Any hint is well appreciated.

thanks
Samuele


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )