[Zope] windows 7 and zope2,X

2010-06-21 Thread Dennis Allison
Does it install cleanly?

Are there any settings issues?

Does it need to be run under the XP virtualizer?

-- 

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


[Zope] ZSyncer-0.71 problems

2009-07-19 Thread Dennis Allison
Zope 2.11, Python 2.4

The authentication issue has been resolved.  Our Zopes run with Pound as a 
reverse proxy front-end.  Current versions of Pound demand conformity to 
the http protocol which ZSyncer violates.  The error returned 
was interpreted incorrectly as an Authentication Error.  Connecting 
directly within the subnet resolved that problem.

Now there is another problem.  My setup has at the source machine has 

user:pass@/zsyncerinstance 

as the destination and selects the ConnectionMgr and relative paths.  
The user:pass is a special user for transfers and has Manager permissions.
In our setup, the zsyncerinstance is in the root directory so it should make 
no difference.  Experimentally, it makes no difference--unchecking the 
relaive feature throws the same error.

"Sync" throws an error with a traceback:

# EOFError
#
# Traceback (most recent call last):
File "/opt/Zope2.11/lib/python/DocumentTemplate/DT_Try.py", line 149, in 
render_try_except
result = render_blocks(self.section, md)
File "/opt/Zope2.11/lib/python/DocumentTemplate/DT_Util.py", line 196, in 
eval
return eval(code, d)
File "", line 0, in ?
File "/opt/zope/zinstances/xxx/Products/ZSyncer/ZSyncer.py", line 
438, 
in manage_compare
include_base=1)
File "/opt/zope/zinstances/xxx/Products/ZSyncer/ZSyncer.py", line 
991, 
in _compare_path
dest_base_info, dest_sub_info = self._getRemoteList(remote, path)
File "/opt/zope/zinstances/xxx/Products/ZSyncer/ZSyncer.py", line 
1211, 
in _getRemoteList
return serverconn.manage_listObjects(path)
File "/opt/zope/zinstances/xxx/Products/ZSyncer/ConnectionMgr.py", line 
183, in __call__
ok,rd = cPickle.loads(data)
EOFError

which has me baffled.  Any suggestions?   Other folks have been using 
ZSyncer without problems on Zope 2.11.

Dieter, you contributed the ConnectionMgr patch -- do you have any idea 
where things might be failing?


___
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] ZSyncer fails to do authenticate under Zope 2.11

2009-07-15 Thread Dennis Allison
I am getting 401 errors with ZSyncer-0.7.1 using a configuration which 
worked with Zope 2.9 and an earler version of the ZSyncer product.  Both 
use Python 2.4.  Has anyone seen this problem?  Can you recommend a fix?
Is the CVS version of ZSyncer on Sourceforge a better choice?


-- 

___
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] Python compatibility for Zope 2.11

2008-10-16 Thread Dennis Allison
Is the appropriate Python still 2.4.5 and not either 2.5.X or 2.6.X?  

-- 

___
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] Strange redirect problem -- can someone assist?

2008-09-28 Thread Dennis Allison
We frequently use a design pattern which uses a multi-part form on a page.  
The form is populated from a RDBMS.  Multiple submit buttons capture the
function to be performed.  The form action routine breaks into a case-like
if-elif-else statement.  Each action (e.g,, 'add', 'edit', 'delete') is
implemented as a separate block of code. The form uses  to transfer
parameters (all strings or empty) to the action.  The action grabs the
parameters, performs its function, and then continues in the application
flow as needed, transferring control using a redirect to the desired URL
with appended CGI parameter. Frequently the redirect simply return to the 
original form for further modification. 

My problem:  In one form for one submit button, the redirect appears to
fail.  The action is performed but the page to which the action redirects
upon completion is never displayed.  Other actions from the same form work
fine.  We have been trying to isolate the problem, but have not been
successful--everything looks correct, but we still see the one failure.  
Nearly identical code in other parts of the system works fine.

Any suggestions would be appreciated.  Is there somthing subtle and 
unusual about the way Zope 2.11 manages redirects?  

Zope 2.11
Python 2.4.X
x86_64 processor running Centos 5.1

Thanks.  -d
-- 

___
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] PHParser/PHPGateway product error: "cannot open the destination file"

2008-06-29 Thread Dennis Allison
This is in reference to the PHParser/PHPGateway product, Version 1.1.5.

The PHParser/PHPGateway systgem looks to be a very useful product.  I want
to use it to bridge to a PHP implemented subsystem rather than either
translate the subsystem or run the subsystem as a separate package with
all the problems of handing off authentication, etc.

The latest version I could find is PHParser/Gateway 1.1.15.  I am using 
Zope 2.9.X under Linux with Python 2.4.  The Linux version is x86_64 
version of Centos 4.X, which is an RPM clone of RedHat.  I am using the 
system provided version of php, which I believe is the correct CGI enabled 
version, and have reviewed the php.ini for it, but have made no changes as 
changes did not seem to be necessary. 

I can execute independent PHP scripts using PHParser, but I have not been 
able to make PHPGateway work.  I set the document root directory, 
/opt/phpgate, in the create dialog.  There is an index.php file in the 
/opt/phpgate which, when executed, produces "Hello World".  When I view 
the PHPGateway object, I get the diagnostic:

PHPGateway cannot open the destination file.

The print trace (commented out in the product) produces:

PHPGATEWAY: self.__realname__ set to manage_interfaces
PHPGATEWAY: self.__realname__ set to manage_interfaces
PHPGATEWAY: docroot /opt/phpgate
PHPGATEWAY: pathsegs value: ['manage_interfaces']
PHPGATEWAY: Opening PHP script: /opt/phpgate/manage_interfaces
PHPGATEWAY: Requested for /draPlay/phpgate
PHPGATEWAY: Printing error page for: /opt/phpgate/manage_interfaces

Several other people have reported a similar problem with PHPGateway, but
I have been unable to find anyone reporting a fix.  Any pointers or
suggestions would be appreciated.

 

___
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] help with customizing error messages, Zope 2.9

2007-09-20 Thread Dennis Allison
Zope 2.9.X, python 2.4

I am in the process of making error messages suitable for a non-techie 
audience.  I want the "real" messages to go into the event log and a 
undetailed custom message to be displayed.  We'll probably want to be able 
to choose whether or not to display the non-techie messages since we do 
our development through the web.

I have been reading the code and am a bit confused.

standard_error_message is a DTML method at the root which is supposed 
to provide hooks for the application to specify it's own error messages.  

standard_error_message should be acquired.  It should be possible for
there to be multiple copies with the particular one to be used selected by
acquisition.  This does not appear to be the case for some errors in my
configuration, but I am not sure why.  

There appears to be nothing in the Zope 2.9 zope.conf file that has to do
with catching error messages.  Is there some configuration that is 
missing to enable full custom error messages.

Looking at the code:

ZPublisher/HTTPResponse.py seems to have a complete set of error
responses hard-wired with outputs that mimic those of the default
standard_error_message.

OFS/SimpleItem.py includes a method called raise_standardErrorMessage
which first acquires and then publishes the standard_error_message.

Zope2/App/startup.py has a method, zpublisher_exception_hook which 
uses raise_standardErrorMessage and is referenced in ZPublisher/Publish.py
where it is used to set error_hook, but error_hook does not appear to be 
used.

It would be helpful to me if someone who understands how this particular 
code works could provide some hints as to what's needed to fully customize 
the error message responses.



___
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] acquisition failure puuzzle or maybe something else

2007-07-27 Thread Dennis Allison

The values are validated and are simple strings.  For our testing purpose 
they are things like 'aaa'.  Also, if that were the problem, eval would 
have thrown a different error since it most likely evaluates the 
parameters before trying to bind the call.  In our testing we have 
replaced the catenation with a static string but still get the error.


On Fri, 27 Jul 2007, Jonathan wrote:

> 
> - Original Message - 
> From: "Dennis Allison" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, July 27, 2007 1:18 PM
> Subject: [Zope] acquisition failure puuzzle or maybe something else
> >
> > I have a dtml method is a folder C and a folder setup
> >
> > /
> >  A
> >  B
> >  C
> >  scripts
> >
> >
> > In the dtml method, there is a call to a script passing in a composed
> > string made up of variables passed in through request inside of a
> > dtml-let,
> >
> >  >>
> > --- methods that use someval ---
> >
> >
> > a pattern we have used in many places without a problem.
> >
> > In this particular case, Zope throws an error
> > File "", line 1, in 
> >   AttributeError: cleanfilename
> >
> > The failing line is (literally)
> >
> >   
> What are the values of cgivar1 and cgivar2 when the error is thrown? (ie. 
> does the cgivar1+'_'+cgivar2 code evaluate to an illegal string - possible 
> if someone enters a name with a character that will kill your code, such as 
> o'neil)
> 
> 
> Jonathan
> 
> 

-- 

___
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] acquisition failure puuzzle or maybe something else

2007-07-27 Thread Dennis Allison

Zope 2.9.X
Python 2.4
Centos 4.4 Linux
Firefox 2.0.0.5  (Linux and Win XP)


I have a dtml method is a folder C and a folder setup  

/ 
  A
  B
  C
  scripts


In the dtml method, there is a call to a script passing in a composed 
string made up of variables passed in through request inside of a 
dtml-let, 


 --- methods that use someval ---


a pattern we have used in many places without a problem.

In this particular case, Zope throws an error

   Traceback (most recent call last):
 File "/usr/local/src/zope/Zope2.9/lib/python/ZPublisher/Publish.py", 
   line 115, in publish
   request, bind=1)
 File "/usr/local/src/zope/Zope2.9/lib/python/ZPublisher/mapply.py", line 
   88, in mapply
   if debug is not None: return debug(object,args,context)
 File "/usr/local/src/zope/Zope2.9/lib/python/ZPublisher/Publish.py", 
   line 41, in call_object
   result=apply(object,args) # Type s to step into published object.
 File "/usr/local/src/zope/Zope2.9/lib/python/OFS/DTMLMethod.py", line 
   144, in __call__
   r=apply(HTML.__call__, (self, client, REQUEST), kw)
 File 
   "/usr/local/src/zope/Zope2.9/lib/python/DocumentTemplate/DT_String.py", 
   line 476, in __call__
   try: result = render_blocks(self._v_blocks, md)
 File "/usr/local/src/zope/Zope2.9/lib/python/DocumentTemplate/DT_In.py", 
   line 630, in renderwob
   if self.elses: return render_blocks(self.elses, md)
 File "/usr/local/src/zope/Zope2.9/lib/python/DocumentTemplate/DT_In.py", 
   line 703, in renderwob
   try: append(render(section, md))
 File 
   "/usr/local/src/zope/Zope2.9/lib/python/DocumentTemplate/DT_Let.py", line 
   75, in render
   else: d[name]=expr(md)
 File 
   "/usr/local/src/zope/Zope2.9/lib/python/DocumentTemplate/DT_Util.py", line 
   196, in eval
   return eval(code, d)
 File "", line 1, in 
   AttributeError: cleanfilename
   
The failing line is (literally)

   with several components.


Now, the failing element is part of a method that fundamentally has a
if-elif structure and the actual code fragment is embedded in a pair of
nested  blocks which have internal -- blocks,
but that is all control structure and should not impact name/attribute
resolution, or so I believe.  A trace through the executing method shows
the control flow is functioning as expected.  Security settings appear to
be correct--and the correct execution of simple test methods (see below)
tend to support that conclusion.

Moving the script into the same folder as the method (that is, moving it from 
the folder scripts to the folder C in the layout above) is a workaround, but it
breaks our coding conventions.  i

Simple test methods in folder C 

   
   
   
   
   

work fine and do not throw the attribute error.

I suspect that this is a problem caused by some trivial error, but we've been
unable to find it.  Any help/suggestions as to how to resolve this puzzle would
be appreciated.



___
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] Please Help - Extracting Info From ZEXP File

2007-04-13 Thread Dennis Allison

+1 -- I'm afraid my answer assumed a vanilla Zope/Plone sight.




On Fri, 13 Apr 2007, Paul Winkler wrote:

> On Fri, Apr 13, 2007 at 12:36:13PM -0500, s wrote:
> > I just took over a website that was done in Zope/Plone. The person formerly
> > responsible for it was not helpful to the client or me in the transition
> > process. Basically he emailed a ZEXP file to me, told me it contains
> > everything I need, and washed his hands of the whole project.
> 
> The .zexp cannot contain everything you need.  It will contain all the
> data (assuming he didn't miss anything), but that data can only be
> loaded if you have a zope system running with all the correct
> third-party software installed.  You should insist on being provided
> with:
> 
> - Zope version
> 
> - Name and version number for every subdirectory of
>   $INSTANCE_HOME/Products/
>   (including, of course, Plone)
>   ... usually each subdirectory will have a file named version.txt
> 
> - Name and version number for every add-on Python package installed to
>   the system, if any.
> 
> Without this information, you will be unable to load the .zexp.
> 
> --
> 
> Paul Winkler
> http://www.slinkp.com
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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 maillist  -  [EMAIL PROTECTED]
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] Please Help - Extracting Info From ZEXP File

2007-04-13 Thread Dennis Allison

Couple of more things:

1) if your site is running, you can look at the actual code throught 
Zope's TTW interfact.  http://your.domaine.com/manage will get you there 
if you have the proper authentication.

2) you can ftp out the code for off line reading.  Look at The Zope Book
for instructions.  You may need to enable the ftp server in the 
configuration file.




On Fri, 13 Apr 2007, Dennis Allison wrote:

> 
> U... 
> 
> Zope is a system that provides for dynamic generation of HTML.  The 
> materials you captured are likely to be a dynamic instance as served to 
> one user and may not be representative ow what might be served to another 
> user or served to the same user in a different context.
> 
> To extract the zope programs from the ZEXP file you will need to create a
> Zope instance, put the ZEXP file into the "import" directory, and import
> it. What you will get will be a collection of Zope objects which, when
> executed dynamically, will produce the site.  You will need to learn Zope 
> and Plone.
> 
> 
> 
> -d
> 
> On Fri, 13 Apr 2007, s wrote:
> 
> > I just took over a website that was done in Zope/Plone. The person formerly
> > responsible for it was not helpful to the client or me in the transition
> > process. Basically he emailed a ZEXP file to me, told me it contains
> > everything I need, and washed his hands of the whole project. I was able to
> > "grab" nearly all the html, css, and javascript files through the web before
> > he removed the site from his server, but now I realize a few pages were
> > missed. So, it seems the only possibility of restoring those missed pages is
> > if 1) everything really is in that ZEXP file and 2) I can find a way to "get
> > to it." I know nothing about Zope/Plone and, no offense to anyone, do not
> > plan on adding it to my repertoire of knowledge in the near future. I just
> > want the "normal" HTML content as it would've been displayed for these
> > certain pages that were not grabbed before he removed the site. Is this
> > possible? If so, could someone please spell out exactly how I can go about
> > retrieving this information from the ZEXP file?
> > 
> >  
> > 
> > Sincerely,
> > 
> > Shawn
> > 
> > Spinner at networthyinc dot com
> > 
> > 
> 
> 

-- 

___
Zope maillist  -  [EMAIL PROTECTED]
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] Please Help - Extracting Info From ZEXP File

2007-04-13 Thread Dennis Allison

U... 

Zope is a system that provides for dynamic generation of HTML.  The 
materials you captured are likely to be a dynamic instance as served to 
one user and may not be representative ow what might be served to another 
user or served to the same user in a different context.

To extract the zope programs from the ZEXP file you will need to create a
Zope instance, put the ZEXP file into the "import" directory, and import
it. What you will get will be a collection of Zope objects which, when
executed dynamically, will produce the site.  You will need to learn Zope 
and Plone.



-d

On Fri, 13 Apr 2007, s wrote:

> I just took over a website that was done in Zope/Plone. The person formerly
> responsible for it was not helpful to the client or me in the transition
> process. Basically he emailed a ZEXP file to me, told me it contains
> everything I need, and washed his hands of the whole project. I was able to
> "grab" nearly all the html, css, and javascript files through the web before
> he removed the site from his server, but now I realize a few pages were
> missed. So, it seems the only possibility of restoring those missed pages is
> if 1) everything really is in that ZEXP file and 2) I can find a way to "get
> to it." I know nothing about Zope/Plone and, no offense to anyone, do not
> plan on adding it to my repertoire of knowledge in the near future. I just
> want the "normal" HTML content as it would've been displayed for these
> certain pages that were not grabbed before he removed the site. Is this
> possible? If so, could someone please spell out exactly how I can go about
> retrieving this information from the ZEXP file?
> 
>  
> 
> Sincerely,
> 
> Shawn
> 
> Spinner at networthyinc dot com
> 
> 

-- 

___
Zope maillist  -  [EMAIL PROTECTED]
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] All Of My Zope 2.6 Transactions Since 2/6/07 Are Gone!

2007-03-30 Thread Dennis Allison

Have you checked the Data.fs to determine if it has been coddled?  How
large is the Data.fs?  Which version of Python are you using to run Zope?


On Fri, 30 Mar 2007, Mark, Jonathan (Integic) wrote:

> Zope 2.6.2 on Red Hat 7.3 started acting flaky a week or two ago. It
> started dying every day or so. Then it lost all transactions since
> 2/6/07, displaying content as it was two months ago.
> 
> Then it recovered the lost content, now it has lost it again. Zope Undo
> shows incorrectly that there were no transactions between 2/6/07 and
> 3/28/07 when the data loss occurred.
> 
> What is the best approach to getting this data back?
> 
> ___
> 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 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] Lost user credentials

2007-03-12 Thread Dennis Allison
On Mon, 12 Mar 2007, Garito wrote:

> To Dennis: I use Zope 2.9.5 final. Is this version concern
> 

Reviewing your reposted description of the problem, the patch I sent does
not appear applicable.

-- 

___
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] Lost user credentials

2007-03-12 Thread Dennis Allison

I did not catch the original post and so don't know any of the details,
but it sounds like a problem with the logging system, not a loss of
credentials.  We had long ago and resolved with the list's help.  This 
patch is still in use with Zope 2.9.X.

You need to patch ../lib/python/ZServer/medusa/http_server.py

--- ./v0.0/http_server.py   2004-12-25 22:39:31.0 -0800
+++ ./v0.1/http_server.py   2004-12-25 22:39:31.0 -0800
@@ -36,6 +36,9 @@
 from counter import counter
 from urllib import unquote

+# Paul's Patch (a shameful thing) to make names register properly
+from ZPublisher.HTTPRequest import parse_cookie
+
 # 
===
 #  Request Object
 # 
===
@@ -277,6 +280,7 @@

 auth=self.get_header('Authorization')
 name='Anonymous'
+   
 if auth is not None:
 if string.lower(auth[:6]) == 'basic ':
 try: decoded=base64.decodestring(auth[6:])
@@ -286,10 +290,35 @@
 name = 'Unknown (bad auth string)'
 else:
 name = t[0]
+else:
+# start of patch
+try:
+auth_cookie_name='__ac'
+cookie= None
+try:
+cookies = {}
+header_value = self.get_header("Cookie")
+if header_value:
+parse_cookie(header_value, cookies)
+cookie = cookies.get(auth_cookie_name, None)
+except:
+name = 'Anonymous'
+
+if cookie is not None:
+cookie = unquote(cookie)
+try:
+cookie = base64.decodestring(cookie)
+name, password = tuple( cookie.split(':',1))
+except: name= "Unknown (bad auth cookie)"
+except:
+name = "Failure!"
+# end of patch

+   # log the host domain too
 self.channel.server.logger.log (
 self.channel.addr[0],
-'- %s [%s] "%s" %d %d "%s" "%s"\n' % (
+'%s %s [%s] "%s" %d %d "%s" "%s"\n' % (
+   self.get_header('Host'),
 name,
 self.log_date_string (time.time()),
 self.request,

Hope this helps.



On Mon, 12 Mar 2007, Garito wrote:

> Could any charitable soul take pity on this poor sinner, please...?
> 
> 2007/3/12, Garito <[EMAIL PROTECTED]>:
> >
> > Hi Andreas!
> > What kind of information do you need?
> > On my last messages to the list I send the tracebacks and some other
> > information (need to resend them?)
> >
> > Could you point me what details do you need?
> >
> > Thank you so much for you interest!
> >
> > 2007/3/12, Andreas Jung <[EMAIL PROTECTED]>:
> > >
> > >
> > >
> > > --On 12. März 2007 04:04:31 +0100 Garito <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi all!
> > > > Some days ago I send to the list a question about a problem losting
> > > user
> > > > credentials
> > > >
> > > > In my code I don't use nothing about security and nothing is changed
> > > on
> > > > zmi's security tab
> > > >
> > > > But when I launch a method (Borrar if you remember) the user who
> > > launches
> > > > the action is anonymous not the logged one
> > >
> > > Somewhat hard to believe without a detailed description
> > >
> > > -aj
> > >
> >
> >
> >
> > --
> > Mis Cosas: http://blogs.sistes.net/Garito
> >
> 
> 
> 
> 

-- 

___
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] Suggestion for an opensource barchart/piechart graphic package in python

2007-02-17 Thread Dennis Allison

If you are looking for publications quality charts, you can make a Zopeish 
wrapper for pychart.  http://home.gna.org/pychart/ 


On Sun, 18 Feb 2007, Richard Jones wrote:

> On Sunday 18 February 2007 08:24, Marco Bizzarri wrote:
> > On 2/17/07, Bill Campbell <[EMAIL PROTECTED]> wrote:
> > > On Sat, Feb 17, 2007, Marco Bizzarri wrote:
> > > >Hi all.
> > > >
> > > >I'm looking for an alternative to python gdchart for barchart/piechart
> > > >in a web application. I'm looking to python gdchart 2, but I'm not
> > > >sure on the status of maintenance of the project itself.
> > >
> > > I like gnuplot which makes it pretty easy to create a wide
> > > variety of plots.
> >
> > I know gnuplot; what is the support for python?
> 
> Google. "gnuplot python"
> 
> It's not hard.
> 
> 
> Richard
> ___
> 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 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] doc string rules

2006-10-09 Thread Dennis Allison
Thanks.  What about classes & modules?  Should Foo, in you example, have a 
doc string?  What about the module that Foo belongs to?

On Fri, 2 Jul 2004, Bogdan M. Maryniuck wrote:

> On Thu, Jul 01, 2004 at 08:34:13PM -0700, Dennis Allison wrote:
> > I just had LocalFS break under Zope 2.6.4 with Python 2.3.4 due to a 
> > "missing docstring".  What are the current rules?  Must everything 
> > (procedures, methods, classes, modules) have docstrings?  Even when 
> > running with Z_DEBUG_MODE set to "yes".
> 
> All methods you want to gets published should have at least empty docstring 
> and 
> do not have a name beginning with underscore: 
> 
> class Foo:
> def pulishme(self):
> """ """
> 
> 
> def donotpublishme(self):
> pass
> 
> 
> def _donotpublishmealso(self):
> """ """
> 
> -- 
> ???
> 
> This host is a black hole at HTTP wavelengths. GETs go in, and nothing
> comes out, not even Hawking radiation.
>   -- Graaagh the Mighty on rec.games.roguelike.angband
> 

___
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: Re: [Zope] a LocalFS that works

2006-09-14 Thread Dennis Allison

That's the one you want.  If forgot that it was still a release candidate.

The Plone version has some additional features that Plone uses, but if you 
are not using Plone this should be what you want.


On Thu, 14 Sep 2006, Alan wrote:

> Thanks Dennis,
> 
> I couldn't find the version you mentioned but I got that:
> 
> http://www.easyleading.org/Downloads/LocalFS-1.7rc1-andreas.tar.gz/view
> 
> and I had to do this in LocalFS.py:
> #from OFS.content_types import find_binary
> from zope.app.content_types import find_binary
> 
> And it worked in my  Zope 2.9.3-, python 2.4.2, darwin.
> 
> Does anyone know if the either the patched version above will work
> with Zope 2.8.5-final, python 2.3.5, sunos5? I am not the admin there
> and I just want to save her time having problems if I request her such
> Product to be installed.
> 
> Cheers,
> Alan
> 
> 
> On 14/09/06, Dennis Allison <[EMAIL PROTECTED]> wrote:
> >
> > Alan,
> >
> > We use LocalFS-1.7-andreas.tar.gz with some local extensions with Zope
> > 2.9.X. I would recommentd that you use it.  The "andreas" LocalFS series
> > is needed for the more recent Zopes.
> >
> >
> > On Thu, 14 Sep 2006, Alan wrote:
> >
> > > Hi list,
> > >
> > > I am playing with two Zope servers version:
> > >
> > > Zope 2.9.3-, python 2.4.2, darwin
> > >  and
> > > Zope 2.8.5-final, python 2.3.5, sunos5
> > >
> > > My problem is where to find a LocalFS that works? I tried version 1.0,
> > > I patched it, but it didn't work. I also saw things like
> > > LocalFS-1.3-andreas.tar.gz (even 1.7!) but from 2004/2005 or
> > > PloneLocalFS (or now PloneSingleLocalFS!), but alpha. To summarize, I
> > > am lost.
> > >
> > > A link would be very welcome. Thanks in advance.
> > >
> > > Cheers,
> > > Alan
> > >
> > >
> >
> > --
> >
> >
> 
> 
> 

-- 

___
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] a LocalFS that works

2006-09-14 Thread Dennis Allison

Alan,

We use LocalFS-1.7-andreas.tar.gz with some local extensions with Zope 
2.9.X. I would recommentd that you use it.  The "andreas" LocalFS series 
is needed for the more recent Zopes.  


On Thu, 14 Sep 2006, Alan wrote:

> Hi list,
> 
> I am playing with two Zope servers version:
> 
> Zope 2.9.3-, python 2.4.2, darwin
>  and
> Zope 2.8.5-final, python 2.3.5, sunos5
> 
> My problem is where to find a LocalFS that works? I tried version 1.0,
> I patched it, but it didn't work. I also saw things like
> LocalFS-1.3-andreas.tar.gz (even 1.7!) but from 2004/2005 or
> PloneLocalFS (or now PloneSingleLocalFS!), but alpha. To summarize, I
> am lost.
> 
> A link would be very welcome. Thanks in advance.
> 
> Cheers,
> Alan
> 
> 

-- 

___
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] TinyTablesPlus How To??

2006-09-03 Thread Dennis Allison

Let me add in my 2cents worth.  Unless you really need TinyTablesPlus for
some product that requires it, you are better off using a relational
database like MySQL.



On Mon, 4 Sep 2006, Andreas Jung wrote:

> 
> 
> --On 3. September 2006 17:12:04 -0400 beno <[EMAIL PROTECTED]> wrote:
> 
> > Hi;
> > I've installed TinyTablesPlus, but how do I use it? I can't find any
> > documentation!
> >
> 
> Beno, do yourself and us a favor: open your eyes before posting.
> TinyTablesPlus contains a 250 line long README.txt which explains the usage
> of the product.
> 
> -aj

-- 

___
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] LocalFS cut and paste across LocalFS instaces

2006-08-31 Thread Dennis Allison

I have a zope system (Zope 2.9.2) that needs to be able to cut and paste
between different instances of LocalFS.  Specifically, I have two LocalFS
instances, LFS1 and LFS2.  The two local files systems are disjoint and
image different parts of the local file directory tree.  What I need to be
able to do is to cut and paste files and directories fom one instance to
the other.  The clipboard object appears to be missing adequate contest to
cut and paste across instances.  Has anyone modified the LocalFS product
to handle, say, cutting a a file from LFS1 and pasting it into LFS2?


-- 

___
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 best to copy and paste in pythonscript?

2006-08-28 Thread Dennis Allison
Andreas -- 

Take the compliment.  Either way, you have been a great resource for me 
in 
the past and will, I hope, continue to be so in the future.


On Mon, 28 Aug 2006, Andreas Jung wrote:

> 
> 
> --On 28. August 2006 07:41:03 -0700 Dennis Allison 
> <[EMAIL PROTECTED]> wrote:
> 
> > AJ --
> >
> > You are, of course, correct.  I wanted Gaute to take a look at the
> > actual code and proceed from there.  Docfinder is also a useful approach
> > for learning about the system.
> >
> > Gaute --
> >
> > If you are a frequent reader of this list, you know that AJ's style is to
> > encourage posters to 1) be complete and precise in the questions they post
> > and 2) provide just enough infomration for the poster to discover the
> > answer to his/her post himself.  This is an excellent pedagogical
> > strategy but sometimes is frustrating.
> 
> No, it's personal laziness to provide the food bite-size :-)
> 
> Andreas

-- 

___
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 best to copy and paste in pythonscript?

2006-08-28 Thread Dennis Allison
AJ --

You are, of course, correct.  I wanted Gaute to take a look at the 
actual code and proceed from there.  Docfinder is also a useful approach 
for learning about the system.

Gaute --

If you are a frequent reader of this list, you know that AJ's style is to 
encourage posters to 1) be complete and precise in the questions they post
and 2) provide just enough infomration for the poster to discover the 
answer to his/her post himself.  This is an excellent pedagogical 
strategy but sometimes is frustrating.


On Mon, 28 Aug 2006, Andreas Jung wrote:

> 
> 
> --On 28. August 2006 07:24:40 -0700 Dennis Allison 
> <[EMAIL PROTECTED]> wrote:
> 
> >
> > Take a look at the actual code.  Th API requires a that a clipboard
> > object acquired from the copy be sent to the paste.
> >
> >
> >
> 
> This is not entirely true. If you look at the code you'll that you might 
> pass None as clipboard object and the method will try to get the value
> from the REQUEST. But in this case you must pass in the REQUEST as keyword 
> parameter and not as positional argument.
> 
> But back to the original discussion API vs. implementation..To quote Dieter:
> Unlike the API documentation which describes how things should be, the 
> Docfinder documentation describes (at least partially) how they really are: 
> complete and precise :-)
> 
> -aj

-- 

___
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 best to copy and paste in pythonscript?

2006-08-28 Thread Dennis Allison

Take a look at the actual code.  Th API requires a that a clipboard
object acquired from the copy be sent to the paste.


On Mon, 28 Aug 2006, Gaute Amundsen wrote:

> 
> Hi.
> 
> I am having some strange problems getting copy and paste to work propperly in 
>  
> python script
> 
> Basically I do:
> 
> parent.manage_copyObjects([currFold.id], REQUEST)
> 
> in one script, and:
> 
> dest_fold.manage_pasteObjects(REQUEST)
> 
> in another
> 
> I have tried a lot of variations, and read all that I could goolge about it, 
> but stil it won't work.
> 
> Could somebody please tell me the "canonical" way of dooing this?
> 
> Regards
> 
> Gaute Amundsen
> ___
> 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 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] Trouble with PIL and Zope 2.8

2006-08-18 Thread Dennis Allison

Be sure that PIL is installed into the python you are using to run Zope.


On Fri, 18 Aug 2006, Dan Gaibel wrote:

> Hello group,
> 
> I am having problems with my PIL installation and I wonder if anyone  
> has any ideas..
> 
> After what looked like a successful install of PIL 1.1.5 I am getting  
> errors like "encoder jpeg not available" even though it looked like  
> jpeg support compiled just fine in setup. Perhaps there is a special  
> way to install PIL for use in Zope? Any advice is much appreciated.
> 
> What I'm working with:
> 
> Fedora Core 4
> Python 2.3.5
> Zope 2.8.6
> PIL 1.1.5
> 
> Thanks!
> 
> Dan
> ___
> 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 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: POUND AND ZOPE HELL!!! was: Re: [Zope] Can't Find This Bug

2006-08-16 Thread Dennis Allison
A port scan of your IP address, 202,71.106.119, shows port 8080 open but 
does not show port 80.

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
Interesting ports on  (202.71.106.119):
(The 1536 ports scanned but not shown below are in state: closed)
Port   State   Service
21/tcp openftp 
22/tcp openssh 
25/tcp opensmtp
110/tcpopenpop-3   
111/tcpfilteredsunrpc  
135/tcpfilteredloc-srv 
139/tcpfilterednetbios-ssn 
143/tcpopenimap2   
445/tcpfilteredmicrosoft-ds
593/tcpfilteredhttp-rpc-epmap  
707/tcpfilteredunknown 
993/tcpopenimaps   
1434/tcp   filteredms-sql-m
3306/tcp   openmysql   
/tcp   filteredkrb524  
8080/tcp   openhttp-proxy  
12345/tcp  filteredNetBus  
31337/tcp  filteredElite  

On Wed, 16 Aug 2006, beno - wrote:

> 2
> 
> Dennis Allison <[EMAIL PROTECTED]> wrote: Ummm... the HeadRequire directive 
> is matched with a regex.  See the code 
> to establish which of the several possible C libraries is used as there 
> are minor variations in syntax.
> 
> Why is the backend address on the open net?  I would have expected that 
> you would have used 127.0.0.1 for a single machine or one a non-routable 
> address for a cluster.  
> 
> I was confused and found something that worked. I just updated to 127.0.0.1 
> as per your suggestion and restarted Pound, all is well.
> 
> What does your zope.conf look like.  
> 
> Here it is without comments:
> 
> %define INSTANCE /usr/local/zope/instance1
> %define ZOPE /usr/local/zope/278
> instancehome $INSTANCE
> effective-user tick
> 
>   level INFO
>   
> path $INSTANCE/log/event.log
> level info
>   
> 
> 
> 
>   level WARN
>   
> path $INSTANCE/log/Z2.log
> format %(message)s
>   
> 
> 
>   # valid keys are "address" and "force-connection-close"
>   address 8080
>   # force-connection-close on
> 
> 
> 
>   # valid key is "address"
>   address 8021
> 
> 
> # Main FileStorage database
> 
>   path $INSTANCE/var/Data.fs
> 
> mount-point /
> 
> 
> 
> # Temporary storage database (for sessions)
> 
>   name temporary storage for sessioning
> 
> mount-point /temp_folder
> container-class Products.TemporaryFolder.TemporaryContainer
> 
> 
> I noticed as I copied this that the "effective-user" of "tick" was recently 
> deleted from the ACL_Users folder, so I just re-added it. I'll contact the 
> client and see if that helped.
> 
> What IPs is Zope listening to?  What ports?   
> 
> Well, I don't see that in the zope.conf file, but Zope published pages for me 
> just fine when Pound was pointing to 202.71.106.119:8080 and now to 
> 127.0.0.1:8080. 
> 
> Likewise, what IPs and ports is pound listening to? 
> 
> Pound listens to 202.71.106.119:80
> Thanks,
> beno
> 
> 
> 
>   
> -
> Do you Yahoo!?
>  Everyone is raving about the  all-new Yahoo! Mail Beta.
>   
> -
> Do you Yahoo!?
>  Everyone is raving about the  all-new Yahoo! Mail Beta.

-- 

___
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: POUND/VHM AND ZOPE HELL!!! was: Re: [Zope] Can't Find This Bug!

2006-08-16 Thread Dennis Allison

Could it be that the combination of Pound and VHM are mapping your 
client's connection to your personal website?

Does your pesonal website have a splash screen that presents "Zope \n 
Welcome to Web.vi"?  If so, you should be able to find the log enties and 
get a bit more information.   Pound has several logging options which may 
also be helpful.  

As several folks here have noted, you need to approach this problem 
systematically.  You need to try to trace what is happending using the 
tool that are available.   

On Wed, 16 Aug 2006, beno - wrote:

> So...
> * I cannot find any IP addresses in Z2.log that these clients would be using 
> to access their sites.
> * I can find plenty of examples of my own IP address, so I know it's logging 
> correctly.
> Therefore, it would appear that the requests coming from these clients aren't 
> reaching Zope. DO YOU AGREE WITH THAT CONCLUSION?
> 
> However, if they *aren't* reaching Zope, why do they receive a screen message 
> like this: "Zope \n Welcome to Web.vi" where web.vi is my personal site?
> 
> TIA,
> beno
> 
>   
> -
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
> starting at 1¢/min.

-- 

___
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: POUND AND ZOPE HELL!!! was: Re: [Zope] Can't Find This Bug!

2006-08-16 Thread Dennis Allison
On Wed, 16 Aug 2006, beno - wrote:

> To summarize, I'm newly using Pound as a reverse-proxy for Zope. I'm using 
> VHM mapping to pass the requests to the appropriate folders in Zope. I have 
> some clients who can't see their sites, but I and many others can. They get 
> this message: "Zope \n Welcome to Web.vi" which is my site (web.vi). I can 
> see the sites just fine. And I can't find a bug anywhere!!!
> 

beno --

Have you checked your Poound configuration file and your VHM
configuration?  I suspect that your problems lie there and not in Zope,
per se.

One thing to be wary about although I am not sure whether it is the source
of your problem the order in which thing appear in the Pouond
contifugation file.  The regular expressions are applied sequentially in
the order they appear in the configuration file, first match wins.  You
also should be sure you have a default in the Pound configuration.

Also, since VHM is a match/rewrite system on the URLs, you need to be sure
that what you are generating from Pound matches VHM's expectations.

BTW, which version of Pound are you using?

-d


___
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] Log Files Not Logging

2006-08-15 Thread Dennis Allison

The log rotation process is simple.  Rename the logs to whatever 
name you want to use for archival purposes.  Then (assuming you are 
using the usual setup and zopectl:

# zopectl> logreopen

which will close and reopen the logs.  

The behavior you observed is exactly the Unix behavior that would be 
expected, since the log files were open.  When you overwrote the log 
file, you created a new file (Z2.log) but the old file (once called 
Z2.log) remained open.  Normally it would have been deleted, but since 
Zope had it open, it remains open and won't be deleted until it is 
closed.  I hope you made a copy of the old Z2.log if it is important;
absent some significant recovery hacking, it's most likely going to 
disappear when you execute logreopen from zopectl or restart zope.

On Tue, 15 Aug 2006 [EMAIL PROTECTED] wrote:

> Hi;
> I just took over managing my own server. The Z2.log files were enormous, 
> so as a quick fix (before creating a rotation cron job) I created a new 
> file and moved it to Z2.log Everything was the same except the owner was 
> root, so I chowned it over and made it the same as before I cleared off 
> the old one. But when I go to hit sites the hits aren't logged. (Note: 
> It's not an error I'm looking for at first in the log, just a regular 
> hit.) Here's a partial printout of "ls -al":
> 
> -rw-r--r--  1 tick  wheel0 Aug 15 14:15 Z2.log
> -rw-r--r--  1 tick  wheel0 Aug 15 13:36 event.log
> 
> Same as before I touched it. Did I do something wrong? Or am I just 
> being impatient?
> TIA,
> beno
> ___
> 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 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] cannot paste objects

2006-08-11 Thread Dennis Allison
Dean,

Have you checked permissions on the var and log directories in your 
instance?  

Have you verified that the security settings give Managers proper 
authorization?

When you say you are "Logged in as administrator" should we presume
that you are logged into the ZMI as a user with a "manager" role.


On Fri, 11 Aug 2006, Andreas Jung wrote:

> Works for me as expected.
> 
> -aj
> 
> --On 11. August 2006 16:12:47 +0100 Dean Hale <[EMAIL PROTECTED]> 
> wrote:
> 
> > Hi
> >
> > A strange one here so any help appreciated.
> >
> > I have installed Zope 2.9.4-final, python 2.4.3 onto a linux box and  i
> > can not paste any objects within the ZMI. I can copy an item  however the
> > paste button never appears. Logged in as administrator  etc so should
> > have the rights?
> >
> > thanks
> > dean
> >
> >
> >
> >
> >
> >
> > --
> > University of Sunderland ??? life-changing: see our new TV advert at
> > http://www.lifechangingsunderland.com or http://www.sunderland.ac.uk
> 
> 
> 
> 

-- 

___
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] MySQL queries in Python

2006-08-01 Thread Dennis Allison

Usually you install the database adaptor ZMySQLDB and make queries through 
a ZSQL Method object.

On Tue, 1 Aug 2006, Muk Yan wrote:

> Dear Coveted Braintrust,
> 
> I was wondering if anyone had any experience with MySQL queries in Python in
> Zope:
> 
> import MySQLdb
> import string
> 
> request = container.REQUEST
> session = request.SESSION
> 
> result = (context.aq_parent).selects.select_from_table()
> 
> print result
> return printed
> 
> WHERE select.select_from_table() IS:
> 
> SELECT name
> FROM person
> WHERE ID = 
> 
> I know the MySQL query works, but I get garbage results from the python
> script ().  All I
> want is to contain the results of the SQL query in a list or container.
> 
> Thanks and take care,
> Muk Yan
> 

-- 

___
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] Trying to trap ConflictError

2006-07-04 Thread Dennis Allison

You might also want to use the conflict resulution hook.  The reason  
you don't see the Conflict Error exception is that it is caught and 
triggers a conflict resolution process.


On Tue, 4 Jul 2006, Jonathan wrote:

> 
> - Original Message - 
> From: "Dennis Allison" <[EMAIL PROTECTED]>
> To: "Jonathan" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Tuesday, July 04, 2006 1:27 PM
> Subject: Re: [Zope] Trying to trap ConflictError
> 
> 
> >
> > Johnathan,
> >
> > I have been lurking, following your thread, but not paying full
> > attention.  Excuse me if thes points have been made before.
> >
> > There are many long threads on Conflict Errors.  You should read them.
> > Note that there have been significant changes in management strategy
> > beginning with Zope 2.9.X.
> >
> > A "Conflict Error" is not really an error in the usual sense;  it is an
> > indication of conflicting transactions in the ZODB, that is, transactions
> > have violated the optimistic locking used by the ZODB.  In general,
> > Conflict Errors are resolved without problem.  The resolution usually
> > involves rolling back the older transaction and committing the newer
> > transaction.  When the actions associated with the rolled back transaction
> > are not themselves fully transactional (for example, a file write) there
> > can be unanticipated side effects.
> >
> > Your conflicts appear to be in Temporary Storage which is used for
> > Session Variables.  The version that ships with Zope is flexible and
> > complex and, IMHO, overkill.  Moreover, it has some unexpected properties,
> > the most significant is that, even though session variables are stored in
> > RAM, it occasionally uses the ZODB to manage session variable expiration.
> > You can often decrease the number of session variable induced conflicts by
> > increasing the lifetime of session variables.
> >
> 
> As both you and Andreas have recommended, I have started researching 'ZODB 
> Conflict Resolution' and if I come up with generic/reusable external method 
> application-level solution I will post it.
> 
> By way of providing more information:
> 
> I am not using sessions.  I am using  TemporaryStorage to hold small, 
> custom-made, short-lived image objects (the use case requires that each user 
> views a static image with a custom overlay, and that the user accesses this 
> customized image via an html img tag). The custom images are viewed only 
> once, and then can be deleted. Hence the use of TemporaryStorage (to 
> eliminate many disk writes and ZODB bloating). The image objects stored in 
> TemporaryStorage are never overwritten, edited etc (which is causing me some 
> confusion as to why the conflict errors are occurring), they are simply 
> created, stored in the TemporaryStorage folder (actually a BTreeFolder2 
> folder contained within the TemporaryStorage folder) and then 2 minutes 
> later are deleted.  I am guessing that the conflicts are occuring as the 
> TemporaryStorage is trying to delete old images while new image object 'add 
> requests' are piling up, but I have yet to determine the cause of the 
> conflict with 100% certainty (conflicts only occur under heavy loading, and 
> not always in the same place in the load testing).
> 
> 
> Thanks again for everyone's help!
> 
> Jonathan
> 

-- 

___
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] Trying to trap ConflictError

2006-07-04 Thread Dennis Allison

You did not mention what LOG LEVEL you were using.  I would suggest
setting it to BLATHER (you are using Zope 2.9.2 I believe -- the log
systems is in transition but I think BLATHER is appropriate for 2.9.2).
This will allow you to look at the transactions with a bit finer 
grainularlity.


On Tue, 4 Jul 2006, Jonathan wrote:

> 
> - Original Message - 
> From: "Dennis Allison" <[EMAIL PROTECTED]>
> To: "Jonathan" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Tuesday, July 04, 2006 1:27 PM
> Subject: Re: [Zope] Trying to trap ConflictError
> 
> 
> >
> > Johnathan,
> >
> > I have been lurking, following your thread, but not paying full
> > attention.  Excuse me if thes points have been made before.
> >
> > There are many long threads on Conflict Errors.  You should read them.
> > Note that there have been significant changes in management strategy
> > beginning with Zope 2.9.X.
> >
> > A "Conflict Error" is not really an error in the usual sense;  it is an
> > indication of conflicting transactions in the ZODB, that is, transactions
> > have violated the optimistic locking used by the ZODB.  In general,
> > Conflict Errors are resolved without problem.  The resolution usually
> > involves rolling back the older transaction and committing the newer
> > transaction.  When the actions associated with the rolled back transaction
> > are not themselves fully transactional (for example, a file write) there
> > can be unanticipated side effects.
> >
> > Your conflicts appear to be in Temporary Storage which is used for
> > Session Variables.  The version that ships with Zope is flexible and
> > complex and, IMHO, overkill.  Moreover, it has some unexpected properties,
> > the most significant is that, even though session variables are stored in
> > RAM, it occasionally uses the ZODB to manage session variable expiration.
> > You can often decrease the number of session variable induced conflicts by
> > increasing the lifetime of session variables.
> >
> 
> As both you and Andreas have recommended, I have started researching 'ZODB 
> Conflict Resolution' and if I come up with generic/reusable external method 
> application-level solution I will post it.
> 
> By way of providing more information:
> 
> I am not using sessions.  I am using  TemporaryStorage to hold small, 
> custom-made, short-lived image objects (the use case requires that each user 
> views a static image with a custom overlay, and that the user accesses this 
> customized image via an html img tag). The custom images are viewed only 
> once, and then can be deleted. Hence the use of TemporaryStorage (to 
> eliminate many disk writes and ZODB bloating). The image objects stored in 
> TemporaryStorage are never overwritten, edited etc (which is causing me some 
> confusion as to why the conflict errors are occurring), they are simply 
> created, stored in the TemporaryStorage folder (actually a BTreeFolder2 
> folder contained within the TemporaryStorage folder) and then 2 minutes 
> later are deleted.  I am guessing that the conflicts are occuring as the 
> TemporaryStorage is trying to delete old images while new image object 'add 
> requests' are piling up, but I have yet to determine the cause of the 
> conflict with 100% certainty (conflicts only occur under heavy loading, and 
> not always in the same place in the load testing).
> 
> 
> Thanks again for everyone's help!
> 
> Jonathan
> 

-- 

___
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] Trying to trap ConflictError

2006-07-04 Thread Dennis Allison

Johnathan,
 
I have been lurking, following your thread, but not paying full 
attention.  Excuse me if thes points have been made before.

There are many long threads on Conflict Errors.  You should read them.
Note that there have been significant changes in management strategy 
beginning with Zope 2.9.X. 

A "Conflict Error" is not really an error in the usual sense;  it is an
indication of conflicting transactions in the ZODB, that is, transactions
have violated the optimistic locking used by the ZODB.  In general,
Conflict Errors are resolved without problem.  The resolution usually
involves rolling back the older transaction and committing the newer
transaction.  When the actions associated with the rolled back transaction
are not themselves fully transactional (for example, a file write) there
can be unanticipated side effects.

Your conflicts appear to be in Temporary Storage which is used for 
Session Variables.  The version that ships with Zope is flexible and 
complex and, IMHO, overkill.  Moreover, it has some unexpected properties, 
the most significant is that, even though session variables are stored in 
RAM, it occasionally uses the ZODB to manage session variable expiration.
You can often decrease the number of session variable induced conflicts by 
increasing the lifetime of session variables.  




-- 

___
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] ConflictError with *one* ZEO client?

2006-06-27 Thread Dennis Allison

Which Zope are you using?  Set the logging level to BLATHER and try 
running with runzope rather than zopectl and see what happens.   The
event log should help localize the problem.  Be sure to check both the 
ZEO logs and the Zope logs.

Also, it helps if you post the traceback.


On Wed, 28 Jun 2006, Richard Jones wrote:

> I've got a zopectl script I'm trying to run with the "zopectl run" command. 
> It 
> crashes out with a ConflictError even if there are no other ZEO clients 
> connected to the ZEO store. I've restarted the ZEO store, no change.
> 
> Any advice? Ideas?
> 
> 
> Richard
> ___
> 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 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] dtml forwarding request

2006-06-08 Thread Dennis Allison

You can do a redirect and construct the cgi space from REQUEST.  


On Thu, 8 Jun 2006, Alric Aneron wrote:

> The dtml_method where I want to forward to is on another server, so your may 
> would be a little hard to do.  Sorry, I didn't make myself clear the first 
> time.
> 
> Thanks, any suggestions?
> 
> Jonathan <[EMAIL PROTECTED]> wrote:   if you want to go straight from one 
> dtml routine to  another just use dtml-var (ie.  have dtml  method A call 
> dtml method B) -  then in dtml method A have:
>   
>  
>   
>  This will 'pass' control and the REQUEST space from  A to B.
>   
>  Is this is not what you are looking for, then  provide some more info as to 
> your use case.
>   
>   
>   
>  Jonathan
> - Original Message - 
>From:AlricAneron 
>To: zope@zope.org 
>Sent: Thursday, June 08, 2006 4:22PM
>Subject: [Zope] dtml forwardingrequest
>
> 
> Hello,
> Is there a way in Zope to forward a request from onepage to another.  
> When I say "forward" a request, I want to retain allthe GET and POST 
> request parameters.  So similar to  expr="RESPONSE.redirect('...')"> but response.redirect loses all the
> request parameters.
> I've been looking around and couldn't find it.
> Anyideas?
> 
> Thanks in advance!
>   
> 
> -
>Yahoo! Groups gets better. Checkout the new email design. Plus 
> there�s much more to come.   
> 
> -
> 
> ___
> 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)
> 
> 
>   
> -
> Sneak preview the  all-new Yahoo.com. It's not radically different. Just 
> radically better. 

-- 

___
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] Templates vs DTML

2006-06-05 Thread Dennis Allison

We've been using DTML but we are at a point where we could move to page 
templates.  

We are starting a major restruture and rewrite of much of the 
system and are debating moving to ZPT.  Performance is potentially a major 
issue.  We are using Zope 2.9.X, will eventually move to Zope 2.10.X and 
Five.  Python 2.4.X.

Has anyone done any benchmark comparison of the two design choices?  For 
the same functionality, which performs better.  No flame wars about which 
is better, just information about performance.  





___
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] LocalFS problems

2006-05-08 Thread Dennis Allison

Or just do a custom tpValues equivalent for the particular special case.

I suspect that is what we will try next...   ;-)


On Mon, 8 May 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > LocalFS product (1.3-andreas) seems to be having a problem with the
> >  tag in Zope 2.9.2/Python 2.4.2.  
> 
> Then don't use DTML, it does, after all suck (tm) ;-)
> 
> > The problem seems to be with the tpValues() program in the LocalFS product
> > which returns an empty list. 
> 
> then tpValues() is likely wrong for localfs, unless localfs doesn't want 
> to play ball with the tree tag. Given that the tree tag is used by the 
> zmi, and you don't really want to display potentially millions of 
> sub-objects in the zmi, it might be perfectly legitimate for local-fs to 
> do what it's doing...
> 
> > There seems to be some trickery going on with the isPrincipiaFolderish 
> > and the tree_view attributes, but I don't quite get what's supposed to 
> > happen.  SmileyChris?  I think these were your mods.
> 
> Not me, I don't smile, but you knew that already ;-)
> 
> > Incidentally, the ZMI panel which uses  seems to have the same
> > sort of problems I am seeing when there is a LocalFS.
> 
> See my comments above.
> 
> I'd roll your own code without using dtml and just iterate over the 
> objectIds method...
> 
> cheers,
> 
> Chris
> 
> 

-- 

___
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] LocalFS problems

2006-05-07 Thread Dennis Allison

Chris, Andreas, others

LocalFS product (1.3-andreas) seems to be having a problem with the
 tag in Zope 2.9.2/Python 2.4.2.  The  behavior is
very different for a folder with three nested sub-folders (a list of the
three nested sub-folders) that what is seen when pointed to a LocalFS with
three nested subdirectories, even though they should be similar or the
same.

The problem seems to be with the tpValues() program in the LocalFS product
which returns an empty list.  The controlling flag,
o.isPrincipiaFolderish, seems to be set to zero when it ought to have a
value of 1 when the object being referenced is a LocalDirectory instance.  
As a result, instead of returning a list of sub-directories it returns an 
empty list. 

There seems to be some trickery going on with the isPrincipiaFolderish 
and the tree_view attributes, but I don't quite get what's supposed to 
happen.  SmileyChris?  I think these were your mods.

Incidentally, the ZMI panel which uses  seems to have the same
sort of problems I am seeing when there is a LocalFS.

Has anyone else encountered this problem?  I plan to move to the 1.7-rc1
version, but there does not appear to be a fix for a bug of this sort in 
this latest release.

  






___
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] coercing to Unicode: need string or buffer, NoneType found

2006-04-25 Thread Dennis Allison
Zoe 2.9.0, Python 2.4.2

## Script (Python) "ascript"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
root = container.restrictedTraverse('/')
objs = root.ZopeFind(container.this(), obj_metatypes=['External Method'], 
search_sub=1)
for path, method in objs:
   method.reloadIfChanged()
   print method.title, path
return printed

ERROR:

Exception Type  TypeError
Exception Value coercing to Unicode: need string or buffer, 
NoneType found

Traceback (innermost last):

* Module ZPublisher.Publish, line 113, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 40, in call_object
* Module Shared.DC.Scripts.Bindings, line 311, in __call__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 323, in _exec
* Module None, line 4, in ascript
  
  Line 4
* Module Products.ExternalMethod.ExternalMethod, line 154, in 
reloadIfChanged

TypeError: coercing to Unicode: need string or buffer, NoneType found

>From ExternalMethod.py:

152:def reloadIfChanged(self):
   # If the file has been modified since last loaded, force a reload.
==>ts=os.stat(self.filepath())[stat.ST_MTIME]
if (not hasattr(self, '_v_last_read') or
(ts != self._v_last_read)):
self._v_f=self.getFunction(1)
self._v_last_read=ts


Any idea what is causing this error.  Looks to me to be a Python Bug.  A 
bit of Googling shows this error showing up in a number of different 
contexts.  Any suggestions for a workaround?



___
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] Regular Expressions

2006-04-20 Thread Dennis Allison

Regular expressions are usually precluded as a potential security risk.  
You can enable imports into Python Scripts (see instructions in the 
source) fairly easily.  Or you can do the regular expression processing
you need in an External Method or Product.

And, of course, you'll need to "import re" in the module where you 
use it.


On Thu, 20 Apr 2006, April Lekin wrote:

> Can you use regular expressions in Zope?
> 
> I'm trying to do a date match, something like this:
> 
> date = re.match(l_date, '\d\d\d\d\/\d\d/\d\d')
> 
> Looks like it doesn't like the "re.match"?
> 
> ___
> 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 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] Some installation glitches

2006-04-15 Thread Dennis Allison

64-bit machines (dual dual-core AMD Opteron)

First:

Configuring Zope installation

Using Python interpreter at /usr/local/bin/python2.4

/usr/local/bin/python2.4 install.py -q build
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c: 
In function `PyExtensionClass_Export_':
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c:768: 
warning: cast from pointer to integer of different size
/usr/local/bin/python2.4 install.py -q build
/usr/local/bin/python2.4 install.py -q install --skip-build --home 
"/usr/local/src/zope/Zope2.9"


_ExtensionClass is not 64-bit clean.  I believe the warning can be 
ignored.


When I install Zope 2.9.0 on a 64 bit machine the path to the system is 

.../Zope/lib64/python/...

but with Zope 2.9.2, also on a 64-but machine the path to the system is 

...Zope/lib/python/

Why the change?



-- 

___
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] External Methods

2006-04-03 Thread Dennis Allison
Figured it out after the fact  :-(
and have not yet tested it before posting it as a solution

On Mon, 3 Apr 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > Too many and too hard to remember where they are.  I have writen a 
> > FindAndApply external method that uses reloadIfChanged().
> 
> *shrugs*
> 
> If you already had a solution, then why on earth did you bother asking?
> 
> Chris
> 
> 

-- 

___
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] External Methods

2006-04-03 Thread Dennis Allison
Too many and too hard to remember where they are.  I have writen a 
FindAndApply external method that uses reloadIfChanged().



On Mon, 3 Apr 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > When Zope is run in production (as opposed to debug) mode, modifications 
> > to External Methods are not sensed.  What's the programatic way to get 
> > them all refreshed?
> 
> Click the edit button on the external method object.
> 
> cheers,
> 
> Chris
> 
> 

-- 

___
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] External Methods

2006-04-03 Thread Dennis Allison

When Zope is run in production (as opposed to debug) mode, modifications 
to External Methods are not sensed.  What's the programatic way to get 
them all refreshed?

___
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] Re: Stepper on Zope 2.9.X

2006-03-18 Thread Dennis Allison

Thanks Chris.  I'll be doing dsome experimentation and will let you know 
about any problems I find.  -d

On Sat, 18 Mar 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > Chris & others -- 
> > 
> > Anyone have experience with Stepper under Zope 2.8.X and Zope 2.9.X.
> 
> It gets quite hammering under Zope 2.8.x on my current big project.
> 
> I have a worry that there may be some silly bugs in the public release, 
> but if you find any problems in 1.4.1, please let me know!
> 
> Actually, just checked, there's a problem with continue_on_error in the 
> released version, but I have a patch for that if you need to use it.
> 
> I may, of course, just crank out a 1.4.2 with that fix in some time soon ;-)
> 
> As for 2.9.x, nope, not been used by be, but I haven't heard of any 
> problems either...
> 
> cheers,
> 
> Chris
> 
> 

-- 

___
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] Zasync

2006-03-17 Thread Dennis Allison

Has anyone tested and used in production thi sproduct with Zope 2.9.X?


-- 

___
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] Stepper on Zope 2.9.X

2006-03-17 Thread Dennis Allison

Chris & others -- 

Anyone have experience with Stepper under Zope 2.8.X and Zope 2.9.X.



-- 

___
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] Using Twisted rather than ZServer with Zope >= 2.9.0

2006-03-15 Thread Dennis Allison

Ummm well the sprint code does not look like it's production ready.  
:-)  I was hoping that the experiment had been taken a bit further.


On Wed, 15 Mar 2006, Chris McDonough wrote:

> Only minimally, AFAIK.  A sprint in 2004 had this as the topic:
> 
> http://www.zope.org/Members/adytumsolutions/pycon2004/TwistedZope
> 
> - C
> 
> On Mar 15, 2006, at 8:38 PM, Dennis Allison wrote:
> 
> >
> > I know Twisted is used in the Zope 3 space.  Has anyone  
> > experimented with
> > replacing ZServer?  A quick Google search turned up litte information.
> > Pointers?  Experience?
> >
> >
> >
> > -- 
> >
> > ___
> > 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 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] Using Twisted rather than ZServer with Zope >= 2.9.0

2006-03-15 Thread Dennis Allison

I know Twisted is used in the Zope 3 space.  Has anyone experimented with 
replacing ZServer?  A quick Google search turned up litte information.
Pointers?  Experience?



-- 

___
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] "No module named rotor"

2006-03-14 Thread Dennis Allison

Jeff,

Looks like you've happened on a real bug.  rotor() is used when building 
and loading pyp files but is no longer provided with Python.  You should 
file a bug report.

lib/python/App/Extensions.py
lib/python/App/Product.py

both contain references.  If you do not need cross Zope compatibility you 
should be able to safely remove the calls to rotor objects.  
Alternatively, you can write a rotor object which does nothing and use 
that.  Rotor is used to "encrypt" and "decrypt" products.  This is an
obsolete feature of Zope and generally not used (hence, no bug reports).

If you must have compatability, you can download Python1.5 and take the 
rotormodule extension (it's in C) and use it.  You'll possibly have to 
upgrade the API to conform with Zope 2.9.1 and Python 2.4.2.

Me, I'd strip out rotor and be done with it.






On Tue, 14 Mar 2006, Jeff Gentry wrote:

> On Tue, 14 Mar 2006, Jeff Gentry wrote:
> > On Tue, 14 Mar 2006, Andreas Jung wrote:
> > > Scary enough, but obviously this is dead code...otherwise Zope would
> > > not work.
> > Okay ... I will try upgrading Zope (which I've been meaning to do
> > anyways) and see if that changes things.
> 
> So I upgraded to Zope 2.9.1, using Python 2.4.2, and get the exact same
> problem.  I should note that if I make an empty product, ie just "add
> product", enter it and go to distribute that I get this same error.
> 
> exceptions.ImportError
> Sorry, a site error occurred.
> 
> Traceback (innermost last):
> 
> * Module ZPublisher.Publish, line 188, in publish_module_standard
> * Module ZPublisher.Publish, line 145, in publish
> * Module ZPublisher.Publish, line 114, in publish
> * Module ZPublisher.mapply, line 88, in mapply
> * Module ZPublisher.Publish, line 40, in call_object
> * Module App.Product, line 491, in index_html
> * Module App.Product, line 202, in _distribution
> 
> ImportError: No module named rotor
> 
> 
> 
> 

-- 

___
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] "No module named rotor"

2006-03-14 Thread Dennis Allison


Rotor was removed form python for a variety of reasons (see the mailing 
list archives) but one of them was that it's a terrible way to do any sort 
of encryption.  There are numberous python extensions that do encryption
and decryption which could be incorporated into your product.  
Alternatively, you can add rotor as a python script into your product--
and interesting programming project  Hello ...
> 
> I've been trying to put together a relatively small ZMI based
> product.  When I go to distribute it, I click on the "distribution" tab,
> select to allow redistribution and then "create distribution archive", as
> per the Zope Book.  (And I've also tried this w/o allowing redistribution,
> as well as tried this on the toy "Zoo Exhibit" product in the Zope
> Book).  When I click on "create distribution archive" I get:
> 
> *  Module ZPublisher.Publish, line 175, in publish_module_standard
> * Module ZPublisher.Publish, line 132, in publish
> * Module ZPublisher.Publish, line 101, in publish
> * Module ZPublisher.mapply, line 88, in mapply
> * Module ZPublisher.Publish, line 39, in call_object
> * Module App.Product, line 489, in index_html
> * Module App.Product, line 200, in _distribution
> 
> ImportError: No module named rotor
> 
> This also crashes Zope entirely (needs to be restarted).  This is with
> Zope 2.7.3 with python 2.4.1.
> 
> >From what I've read, the rotor module was deprecated in python 2.3 and
> then removed in python 2.4, which would be why I don't have the rotor
> module.  One page I found:
> http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14434
> 
> Seems to describe exactly the situation I'm having.
> 
> My question is what is the appropriate workaround here?  Is this
> considered an issue w/ the version of Python I'm using or the version of
> Zope?  One piece of advice I read (involving importing rotor but not w/
> Zope) was to downgrade to Python 2.3 but I'd prefer not to do that.  If I
> upgrade Zope will that remove the dependence on the rotor module?
> 
> Thanks
> -J
> 
> 
> 
> ___
> 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 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] AttributeError on SESSION

2006-03-13 Thread Dennis Allison

Are cookies enabled?  If not, should be.

what does request look like



Is SESSION presnt?


On Mon, 13 Mar 2006, Jeff Gentry wrote:

> Okay ... I figure I've probably managed to really hose up my Zope instance
> somehow but I can't figure out what it would be.  Whenever I'm trying to
> access the SESSION data, I get an AttributeError on SESSION.  This used to
> work for me and on another Zope instance I have it does indeed work.  I
> used the session test PythonScript from The Zope Book, as follows:
> 
> secs_per_day=24*60*60
> session=context.REQUEST.SESSION
> if session.has_key('last view'):
> # The script has been viewed before, since the 'last view'
> then=session['last view']
> now=context.ZopeTime()
> session['last view']=now # reset last view to now
> return 'Seconds since last view %.2f' % ((now - then) * secs_per_day)
> 
> # The script hasn't been viewed before, since there's no 'last view' 
> session['last view']=context.ZopeTime()
> return 'This is your first view'
> 
> (well, I actually started with other code, but this causes the same
> issue). 
> This works as advertised in my other instance but throws the same
> AttributeError on my first instance.  I'm assuming that I managed to
> delete and/or edit something important without realizing it.  I did some
> web searches on this but didn't really turn up anything, pretty much
> everything I found assumed that SESSION was working :)
> 
> 
> ___
> 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 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] Ape

2006-03-11 Thread Dennis Allison

I am looking to map a portion of the local file system into Zope.  One way 
to do this is to use LocalFS, another is to use Ape.  I am sure there are 
onter approaches as well.  We are using Zop 2.9.X.  Will Ape work in this 
context?  What would you suggest?



___
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] repozo.py

2006-03-07 Thread Dennis Allison

We are (finally) moving to repozo for our backups.  We are running a mixed 
collection of Zopes -- mostly Zope 2.7.6, Zope 2.8.X and Zope 2.9.0.   For 
the near term we cannot move to a single release.  There are differences 
between the versions of repozo distributed with the different Zope 
systems.

I assume that the they are backward compatible and that the repozo.py 
shipped with Zope 2.9.0 is compatible with all variations of the Data.fs
format.



-- 

___
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] readconflicterror

2006-03-06 Thread Dennis Allison

Upgrading to Zope 2.9.X would be my recommendation.  From our experience, 
it's an improvement on 2.8.X which was an improvement on 2.7.X.


On Mon, 6 Mar 2006, Reinoud van Leeuwen wrote:

> On Mon, Mar 06, 2006 at 02:22:08PM -0500, Brian Sullivan wrote:
> > I had this reported a couple of times (apparently randomly) from a
> > site that I am involved in. It seems to happen in the generation of
> > data for a report (which takes a fair length of time and does a lot of
> > zodb accesses) -- This is with Zope 2.7.
> > 
> > >From what I can tell from various searches this is one of those "it
> > just happens sometimes" errors with no real fix. Is there a fix?
> > 
> > If there is no fix is there anything that can be done?
> 
> Upgrade to a newer Zope version. 2.8.x has a newer ZODB version that 
> should resolve a lot of these problems
> 
> 

-- 

___
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] Re: Squishdot installation problems, CVS problems

2006-03-06 Thread Dennis Allison
so many lists, so little time 

On Mon, 6 Mar 2006, Chris Withers wrote:

> Hi Dennis,
> 
> Dennis Allison wrote:
> > 
> > There is a Squishdot patch and several comments about 2.8.X problems on
> > the site. I applied the patch and got a running site but as the patch
> > author notes, the patch is a workaround and probably should be fixed in a
> > different fashion.
> 
> Indeed, did you try the latest 2.8 release?
> 
> > The TinyTable problem is also mentioned on the site, but I've not tried to 
> > track it down (yet).
> 
> OK, well, until someone gives me definites, there's not a lot I can do 
> to help ;-)
> 
> >> Posts to the list would be appreciated more! :-)
> 
> I did actually mean the Squishdot list here ;-)
> 
> cheers,
> 
> Chris
> 
> 

-- 

___
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] Re: Squishdot installation problems, CVS problems

2006-03-05 Thread Dennis Allison

The CVS access could have been a SourceForge problem.

There is a Squishdot patch and several comments about 2.8.X problems on
the site. I applied the patch and got a running site but as the patch
author notes, the patch is a workaround and probably should be fixed in a
different fashion.


The patch (which seems to have worked is) is:

--- lib/python/Products/Squishdot.bak/addSquishdotForm.dtml Fri Aug 18 
00:47:57 2000
+++ lib/python/Products/Squishdot/addSquishdotForm.dtml Wed Sep 21 
12:49:15 2005
@@ -40,12 +40,12 @@
   Mail Host  
   
   
-  
+
   
    
-
+  
   
-
+
   
 
   No Mail Host objects could be found.
@@ -53,7 +53,7 @@
 You will not be able to recieve email notification of postings until 
you create a Mail Host object that is acquirable by your Squishdot Site.
 Once this has been done, you must select that Mail Host in the drop 
down list on the 'Options' management tab of the Squishdot Site.
   
-  
+  
   
 
 
@@ -71,7 +71,7 @@
   This site is not moderated
   
 
- 
+
 
   
   
@@ -82,7 +82,7 @@
   Mail new replies to the admin address.
   
 
- 
+ 
 
   
   


The TinyTable problem is also mentioned on the site, but I've not tried to 
track it down (yet).


On Sun, 5 Mar 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > CVS at SourceForge seems broken.  I got a proxy error
> > when I tried to use the web version and a login  rejection  on anonymous  
> > access.   
> 
> Seems fine for me now...
> 
> > With Zope 2.8.4 and Python 2.4.2 I get:
> > 
> >> Site Error
> >>
> >> An error was encountered while publishing this resource.
> >>
> >> Error Type: TypeError
> >> Error Value: unbound method mailhost_list() must be called with SquishSite 
> >> instance as first argument (got nothing instead)
> 
> This is a specific error with 2.8.4, why aren't you using 2.8.6?
> If you still have problems with 2.8.6 or 2.9.1, please post either to 
> Squishdot.org or the mailing list.
> 
> >> which is mentioned in the postings.  There's also a reported 
> >> TinyTable problem. 
> 
> No one's explained the problem to me...
> 
> >(Has anyone done a mod to use MySQL?)
> 
> Why on earth would you want to do that? ;-)
> 
> Posts to the list would be appreciated more! :-)
> 
> Chris
> 
> 

-- 

___
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] External Methods newbie question

2006-02-28 Thread Dennis Allison

To executed a "whole file" you need to wrap it as a function --

def foo( self ):


and call foo as an external method.  The self argument gives the context.

Python provides several modules which give access to execute bash 
commands, linux commands, etc.  Look at the modules subprocess and 
commands.  



On Tue, 28 Feb 2006, Alric Aneron wrote:

> Hello,
> I see I can only execute python functions in external methods. 
> Is there any way to execute the whole file, not just a certain function?  In 
> linux I created a python script, and it doesn't have functions.  I just want 
> to execute the whole file.  I tried using "self" or "init" for function names 
> in Zope and it doesn't want to do it, telling me "The specified object, init, 
> was not found in module, test."
> 
> Is there a way to execute a file?
> 
> (another question: is there a way to execute bash commands in linux? or is 
> external methods only good for python?)
> 

___
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] Squishdot on Zope 2.9.X with Python 2.4

2006-02-28 Thread Dennis Allison

OK, I'll do that.  My post was to learn whether I was walking into a mine 
field...

On Tue, 28 Feb 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > Yup, it does seem a bit strange, but I'd rather not maintain multiple 
> > versions of Zope if I can avoid it.  And I have a user that wants to 
> > experiment with and/or use Squishdot.
> 
> Try it and see. I personally haven't, but I'd be interested in fixing 
> any problems that do arise...
> 
> Chris
> 
> 

-- 

___
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] Squishdot on Zope 2.9.X with Python 2.4.2

2006-02-28 Thread Dennis Allison

Yup, it does seem a bit strange, but I'd rather not maintain multiple 
versions of Zope if I can avoid it.  And I have a user that wants to 
experiment with and/or use Squishdot.



On Tue, 28 Feb 2006, Jens Vagelpohl wrote:

> 
> On 28 Feb 2006, at 07:26, Dennis Allison wrote:
> 
> >
> > Are there any known compatibilty problems?   -d
> 
> I guess a more appropriate question would be "Has anyone ever done  
> this?", with a likely answer of "no"  ;)
> 
> Chris might have tried it.
> 
> jens
> 
> ___
> 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 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] Squishdot on Zope 2.9.X with Python 2.4.2

2006-02-27 Thread Dennis Allison

Are there any known compatibilty problems?   -d



-- 

___
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] Dates off by one day

2006-02-27 Thread Dennis Allison

It is likely to be a problem with timezones.  Zope recognizes one 
particular date format as UTC and not local.  If that sounds like 
the problem, I can provide a patch.


On Sat, 25 Feb 2006, Kevin Carlson wrote:

> Recently moved to a new server farm and am having a problem with dates 
> from MySQL that are rendered using strftime.  The date in MySQL is 
> correct (e.g. 2005-01-22) but if the date is rendered with strftime the 
> date displayed is one day earlier (e.g., 2005-01-21).  MySQL and Zope 
> are on separate servers as they were before the switch to the new 
> servers but this didn't happen in the old environment.
> 
> Anyone have any thoughts on this?
> 
> Thanks,
> 
> Kevin
> ___
> 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 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] Startup error with Formulator

2006-02-09 Thread Dennis Allison
Thanks.

On Thu, 9 Feb 2006, Martijn Faassen wrote:

> Dennis Allison wrote:
> > Zope 2.8.4
> > Python 2.4.2
> > 
> > Startup error with Formulator.  What's missing or broken?
> 
> > The offending file is:
> > 
> >  > xmlns="http://namespaces.zope.org/zope";
> > xmlns:i18n="http://namespaces.zope.org/i18n";
> > >
> > 
> >   
> >   
> > 
> > 
> 
>  From the INSTALL.txt file:
> 
>Five 1.2 is needed to make i18n work. Alternatively remove the
>file `configure.zcml` from the Formulator directory -- this is
>safe and just removes the i18n support.
> 
> (note that Python 2.4 in general is not the recommended release for 
> python 2.4 but that doesn't have anything to do with this problem)
> 
> Regards,
> 
> Martijn
> 

-- 

___
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] Session Variables Redux

2006-02-08 Thread Dennis Allison

Zope 2.9.0
Python 2.4.2

There appears to still be a problem with session variables that does not
appear to be the result of interactions with conflicts nor the result of
unexpected restarts.  It does not appear to be load related.

The problem we see is a sudden disappearance of all, one, or a small 
number of session variables.  In a session varaiable stateful system this 
is an embarassment.   The behavior is a bit like a variable which is 
not identified as persistent, but all read and write accesses go through
a getSessionVariable/setSessionVariable interface:

## Script (Python) "getSessionVariable"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=varname
##title=
##
request=container.REQUEST
session=request['SESSION']
return session[varname]

## Script (Python) "setSessionVariable"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=var, val
##title=
##
request = container.REQUEST
session=request['SESSION']
# write only if necessary
if not session.has_key(var) or session[var]!=val:
session[var]=val


Our session lifetimes are long (hours, days) and conflicts are fairly 
frequent.  Hand checking of the logs does not show any obvious correlation 
between session variable loss and conflict.  Moreover, all conflicts are 
"resolved".

Does anyone else see this sort of problem?  Any suggestions as to how to 
isolate the problem?  



___
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] Startup error with Formulator

2006-02-08 Thread Dennis Allison
Zope 2.8.4
Python 2.4.2

Startup error with Formulator.  What's missing or broken?

Out of the box:

2006-02-08T01:51:58 ERROR Zope Couldn't install Five
Traceback (most recent call last):
  File "/usr/local/src/zope/Zope2.8/lib/python/OFS/Application.py", line 
773, in install_product
initmethod(context)
  File "/usr/local/src/zope/Zope2.8/lib/python/Products/Five/__init__.py", 
line 29, in initialize
zcml.load_site()
  File "/usr/local/src/zope/Zope2.8/lib/python/Products/Five/zcml.py", 
line 45, in load_site
_context = xmlconfig.file(file)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 439, in file
include(context, name, package)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 375, in include
processxmlfile(f, context)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 245, in processxmlfile
parser.parse(src)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
109, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", 
line 123, in parse
self.feed(buffer)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
216, in feed
self._parser.Parse(data, isFinal)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
364, in end_element_ns
self._cont_handler.endElementNS(pair, None)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 225, in endElementNS
self.context.end()
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 518, in end
self.stack.pop().finish()
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 665, in finish
actions = self.handler(context, **args)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/Products/Five/fiveconfigure.py", 
line 56, in loadProducts
xmlconfig.include(_context, zcml, package=product)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 375, in include
processxmlfile(f, context)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 245, in processxmlfile
parser.parse(src)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
109, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", 
line 123, in parse
self.feed(buffer)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
216, in feed
self._parser.Parse(data, isFinal)
  File 
"/usr/local/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 
353, in start_element_ns
AttributesNSImpl(newattrs, qnames))
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/xmlconfig.py", 
line 206, in startElementNS
self.context.begin(name, data, info)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 515, in begin
self.stack.append(self.stack[-1].contained(__name, __data, __info))
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 815, in contained
return RootStackItem.contained(self, name, data, info)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 683, in contained
factory = self.context.factory(self.context, name)
  File 
"/usr/local/src/zope/Zope2.8/lib/python/zope/configuration/config.py", 
line 461, in factory
raise ConfigurationError("Unknown directive", ns, n)
ZopeXMLConfigurationError: File 
"/usr/local/src/zope/Zope2.8/lib/python/Products/Five/skel/site.zcml", 
line 12.2-12.23
ZopeXMLConfigurationError: File 
"/opt/zope/zproducts/standard/Formulator/configure.zcml", line 7.2
ConfigurationError: ('Unknown directive', 
u'http://namespaces.zope.org/i18n', u'registerTranslations')
--


The offending file is:

http://namespaces.zope.org/zope";
xmlns:i18n="http://namespaces.zope.org/i18n";
>

  
  




-- 

___
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] Zope=ZEO connection

2006-02-07 Thread Dennis Allison
Arh...
I forgot that internal logging levels override.
Still, you'd think something that triggers a crash would have a level
higher than info.  Careful examination of the trace log shows nothing.
I'll fix the log level & see if that turns anything up.   


On Tue, 7 Feb 2006, Paul Winkler wrote:

> On Tue, Feb 07, 2006 at 06:18:49PM -0800, Dennis Allison wrote:
> > 
> > Zope 2.9.0
> > Python 2.4.2
> > Amd dual Opteron
> > Linux
> > 
> > I am seeing occasional (several per day)  Zope crashes under load.  The 
> > event.log immediately before and after the crash looks like:
> > 
> > 
> > 2006-02-06T14:07:20 INFO ZPublisher.Conflict ConflictError at 
> > : 
> > database conflict error (oid 0x086e, class BTrees._OOBTree.OOBTree, serial 
> > this txn started with 0x03633ca95f75e900 2006-02-06 22:01:22.373575, 
> > serial currently committed 0x03633caf59114244 2006-02-06 22:07:20.875176) 
> > (463 conflicts (0 unresolved) since startup at Mon Feb  6 08:21:26 2006)
> > --
> > 2006-02-06T14:09:09 INFO ZServer HTTP server started at Mon Feb  6 
> > 14:09:09 2006
> > Hostname: x-harper
> > Port: 8081
> > 
> > which also triggers a connection drop and restarBt of ZEO.
> > 
> > The failure happens silently even with 
> > 
> > 
> >   level ALL
> >   
> > path $INSTANCE/log/event.log
> > level info
>   ^^
> 
> fwiw, you're still only logging at INFO.
> 
> > What sort of Zope failure can cause this sort of behavior?  What's the 
> > best approach to get more information to localize the failure.
> 
> I really don't know. But I'd have a look at the trace log,
> if you've got that configured (I routinely do).
> Maybe you could spot some patterns right before the crashes?
> *shrug*
> 
> 

-- 

___
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] Zope=ZEO connection

2006-02-07 Thread Dennis Allison

Zope 2.9.0
Python 2.4.2
Amd dual Opteron
Linux

I am seeing occasional (several per day)  Zope crashes under load.  The 
event.log immediately before and after the crash looks like:


2006-02-06T14:07:20 INFO ZPublisher.Conflict ConflictError at 
: 
database conflict error (oid 0x086e, class BTrees._OOBTree.OOBTree, serial 
this txn started with 0x03633ca95f75e900 2006-02-06 22:01:22.373575, 
serial currently committed 0x03633caf59114244 2006-02-06 22:07:20.875176) 
(463 conflicts (0 unresolved) since startup at Mon Feb  6 08:21:26 2006)
--
2006-02-06T14:09:09 INFO ZServer HTTP server started at Mon Feb  6 
14:09:09 2006
Hostname: x-harper
Port: 8081

which also triggers a connection drop and restarBt of ZEO.

The failure happens silently even with 


  level ALL
  
path $INSTANCE/log/event.log
level info
  


When this happens zope is running under zopectl and zeo isi running under
zeoctl.

What sort of Zope failure can cause this sort of behavior?  What's the 
best approach to get more information to localize the failure.



___
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] Re: New Product called Zoep

2006-02-07 Thread Dennis Allison

It is a legitimate concern for everyone in the Zope community regardless 
of what entity owns and controls the trademark.  

On Tue, 7 Feb 2006, Alexander Limi wrote:

> 
> 
> On Tue, 07 Feb 2006 09:55:02 -0800, Dennis Allison  
>  wrote:
> 
> > I think there is potential for confusion.  Both Zope Corp and
> > teh Zope Foundation should send cease and desist letters.
> 
> Zope Foundation does not have anything to do with the trademark,  
> unfortunately. That is Zope Corporation's property, and part of their  
> "equities", according to them.
> 
> A summary of the situation:
> 
> http://www.zopezen.org/Members/limi/zc-communitychat
> 
> 

-- 

___
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] Trademarks, Zope and Zoep

2006-02-07 Thread Dennis Allison

Voipster and Zoep people:

(copied to the Zope Mailing List)

The choice of the "Zoep" name by Voipster for their Firefox Voip plugin
seems to many of us to be easily confused with "Zope" and is a potential
trademark issue.  Becasue of the Slashdot article today there is some
discussion of the issue on the zope.org mailing list.

Zope is open source software.  You may want to take a look at the various
Zope sites (www.zope.org and www.zope.com) and particularly at the
trademark page, http://www.zope.com/about_us/legal/trademark.html

A name change for Zoep seems to be in order to prevent confusion, like the
Mozilla change from Firebird to Firefox.  Becasue Zoep is a new product 
without an established name recognition base, now would be the time for 
such a change. 










___
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] New Product called Zoep

2006-02-07 Thread Dennis Allison

I think there is potential for confusion.  Both Zope Corp and 
teh Zope Foundation should send cease and desist letters.


On Tue, 7 Feb 2006, Jonathan Cyr wrote:

> Hello,
> 
> Is there any concern about naming confusion with the new VOIP browser 
> extension called "Zoep" (from Slashdot this morning).
> 
> Mozilla Firebird became FireFox, due to naming confusion.   Should these 
> folks continue with such a similar name?  Is anyone concerned?
> 
> Two cents,
> 
> -Jon
> 
> 

-- 

___
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] ZEO disconnects, Zope auto restarts (via zopectl)

2006-02-03 Thread Dennis Allison

Paul, 

Thanks for the assist.  Comments on your comments interlinearly below.

I have increased cache and other resources to see what the impact will be. 



On Fri, 3 Feb 2006, Paul Winkler wrote:

> On Fri, Feb 03, 2006 at 01:00:45AM -0800, Dennis Allison wrote:
> > 
> > Zope 2.9.0
> > 
> > We are seeing spontaneous restarts of Zope with no indication in any of 
> > the standard Zope logs.  Looking at the ZEO log indicates that the 
> > restarts of Zope are due to a lost connection between Zope & ZEO but 
> > with no other information.  The logging level is set at the distribution 
> > default (INFO).
> 
> Are you *sure* that is the cause, rather than the effect?  

No, I am not and there's nothing in the logs which hints at why
it restarted.  We are running under load.  The failures are 
silent.  We do have a fairly high rate of conflict errors (which 
all get resolved finally!).

> 
> If zope restarts for any reason, I'd expect the zeo log to 
> show a disconnect and reconnect as a result.
> 
> Check the clocks on your zope and zeo boxes and make sure the timing of
> events in your logs is really what you think it is.  (Systems that
> aren't running ntpd are the bane of my existence...)

Timing correlates to the second.  Zope and ZEO live on the 
same physical box.

> 
> Wild guess: Any chance your Zope process is running out of
> memory?  I've had that on several occasions, when some
> naively-written software attempts to do something huge in
> memory that should really use a temp file on disk.
> (Zope itself used to have some code like that in the FTP
> server, don't know if it still does.)
> 
I doubt if I am hitting a limit.  The box has nearly 8GB of 
memory most of which (6GB) is used by linux as a cache.
No messages in the logs.

> I discovered this by looking  in /var/log/messages.
> At least on linux, the kernel will log something there
> when it kills a process that consumes all available memory.
> 
> > We are running a fairly vanilla setup, excerpted below:
> > [snip...] 
> 
> Unrelated to your problem, and maybe you know this, but depending on the
> size of your storage, I'd consider increasing the zeo client cache size.
> It's a disk cache and you can safely make it huge.  But if you don't see
> "cache flipping" messages in your event log, it may not matter.
> 
Done, but I cannot report on the effect.


___
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] ZEO disconnects, Zope auto restarts (via zopectl)

2006-02-03 Thread Dennis Allison

Zope 2.9.0

We are seeing spontaneous restarts of Zope with no indication in any of 
the standard Zope logs.  Looking at the ZEO log indicates that the 
restarts of Zope are due to a lost connection between Zope & ZEO but 
with no other information.  The logging level is set at the distribution 
default (INFO).

The restarts are a huge problem because session variables are not
persistent and so all of the user state they contain is lost on restart.
In our statful implementation, this is a major problem.  I want to adjust 
the configuration so that the Zope/ZEO connection is stable.
  
In our configuration, Zope and ZEO are linked via localhost on a
distinguished port.

I've Googled about looking for some infomation about tuning the ZEO/Zope 
interface, but have found little real information.   Some additional log
detail would be helpful.

We are running a fairly vanilla setup, excerpted below:

<>
# ZEO client storage:
#

  mount-point /
  # ZODB cache, in number of objects
  cache-size 5000
  
server localhost:8301
storage 1
var $INSTANCE/var
# ZEO client cache, in bytes
cache-size 20MB
# Uncomment to have a persistent disk cache
client group1-zeo
  


<>

  address localhost:8301
  read-only false
  invalidation-queue-size 100
  pid-filename $INSTANCE/var/ZEO.pid
  # monitor-address PORT
  # transaction-timeout SECONDS



  program $INSTANCE/bin/runzeo
  socket-name $INSTANCE/etc/zeo.zdsock
  daemon true
  forever false
  backoff-limit 10
  exit-codes 0, 2
  directory $INSTANCE
  default-to-interactive true
  # user zope
  python /usr/bin/python2.4
  zdrun /usr/local/src/zope/Zope2.9/lib64/python/zdaemon/zdrun.py

  # This logfile should match the one in the zeo.conf file.
  # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it.
  logfile $INSTANCE/log/zeo.log


It's not clear what changes will lead to a more stable connection because 
it is not clear what's triggering the problem.  Any advice would be 
appreciated.

Presumably the shotgun approach would work -- increase the cache sizes, 
lengthen the invalidation-queue-size, and increase the backoff-limit but 
it would be nice to have some guidance.

5~


___
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] Re: raw trace log format

2006-02-02 Thread Dennis Allison

I gleened what I could from the requestrofiler code, but teh 
meaning of the desc field for I is not described in the comments.
A quick check of the code did not help either.  


On Thu, 2 Feb 2006, Tres Seaver wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Dennis Allison wrote:
> > generally it's 
> > 
> > code id fromepoch desc
> > 
> > The desc field is
> > 
> > B   request (e.g. 'GET /')
> > I   ???
> > A   status_code bytes
> > E
> > 
> > The desc for E is normally empty.  The desc for I is usually 0 
> > or a small integer.  Google could not help me find a definition 
> > for the desc value associated with I.  Can someone assist?
> 
> I'd suggest looking at '$SOFTWARE_HOME/utilities/requestprofiler.py',
> which is a tool for reporting against that log file.
> 
> 
> Tres.
> - --
> ===
> Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
> Palladion Software   "Excellence by Design"http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFD4nWO+gerLs4ltQ4RAgdsAJwNaju4xcFLPfo2gBBfaJPjLAiW2QCeM9Cs
> /hfulGb5xV0UZIH04m24d2c=
> =8grz
> -END 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 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] raw trace log format

2006-02-02 Thread Dennis Allison

generally it's 

code id fromepoch desc

The desc field is

B   request (e.g. 'GET /')
I   ???
A   status_code bytes
E

The desc for E is normally empty.  The desc for I is usually 0 
or a small integer.  Google could not help me find a definition 
for the desc value associated with I.  Can someone assist?



-- 

___
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] Off Topic: Good linux editors?

2006-01-28 Thread Dennis Allison

vim, emacs, ...

yu might try nano


On Sat, 28 Jan 2006, David wrote:

> Hi list,
> 
> I'm fairly new to Linux (ubuntu server version) and simply hate VIM. Nor 
> do I want to mind meld with the complex EMACS.   I just wonder what 
> Editors some of you prefer as you write stuff like external scripts, etc.
> 
> thx,
> 
> David
> 
> ___
> 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 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] Where to begin (Performance on 2.9.0 vs. 2.8.4)

2006-01-27 Thread Dennis Allison

Migrating systems to 2.9.0, we have noticed "sluggish" behavior compared 
to 2.8.4.   The 2.8.4 systems run on a dual processor AMD2600 32-bit 
processors.  The 2.9.0 systems run on AMD dual opteron 240 processors.
The dual opteron systems have much more memory, much faster memory, and 
faster disks.  

We use mysql and pound and a number of other systems.  I am trying to 
localize and quantify the performance issue we are seeing.  I have 
checked the raw hardware as seen by python:

2.9.0 machine:  
Pystone(1.1) time for 5 passes = 1.07
This machine benchmarks at 46729 pystones/second

2.8.4 machine:
Pystone(1.1) time for 5 passes = 1.23
This machine benchmarks at 40650.4 pystones/second
 
Running disk benchmarks suggests that the 2.9.0 machine is faster in disk 
operations by 10 to 20 percent.  

I have not yet checked raw network operations yet, but I suspect that they
show equivalent performance.

I believe that Zopes are working fine and that the performance problems we 
are seeing are in the management of network input and output rather than 
in the Zopes themselves.  

Is there some performance test I can use to characterize the Zope system
itself so I can compare Zopes running on the two machines?



___
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] Zope 2.9 and product installation

2006-01-20 Thread Dennis Allison
IssueTracker 0.6.13
Zope 2.9.0
64-bit linux

2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'index_html'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'Statistics'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'ListIssues'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'ShowIssue'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'ListIssues.csv'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'CompleteList'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'export.csv'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_ManagementForm'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_ManagementUpgrade'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_ManagementUsers'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_PropertiesStatusScores'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_editIssueTrackerPropertiesForm'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_ManagementNotifyables'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_configureMenuForm'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'manage_POP3ManagementForm'
--
2006-01-20T09:22:49 WARNING Init Class 
Products.IssueTrackerProduct.IssueTracker.IssueTracker has a security 
declaration for nonexistent method 'ShowIssue'

Other products generate similar warnings.

Is this a problem with Zope 2.9 or an incompatibility introduced as 
Zope 2.X migrates towards Zope 3.X?   What should be done to resolve this 
class of problems.

-- 

___
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] LocalFS under Zope2.9

2006-01-20 Thread Dennis Allison

This is the  LocalFS-1.3-andreas version.  Later releases do not appear to 
address this issue.


2006-01-20T09:22:51 ERROR Zope Couldn't install LocalFS
Traceback (most recent call last):
  File "/usr/local/src/zope/Zope2.9/lib64/python/OFS/Application.py", line 
763, in install_product
global_dict, global_dict, silly)
  File "/opt/zope/zproducts/standard/LocalFS/__init__.py", line 44, in ?
import os, LocalFS
  File "/opt/zope/zproducts/standard/LocalFS/LocalFS.py", line 51, in ?
from OFS.content_types import find_binary
ImportError: cannot import name find_binary





-- 

___
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] Autoconnect with ZMySQLDA 2.0.9

2006-01-17 Thread Dennis Allison

After some investigation, this appears to be a mysql bug or brain-dead 
semantics for mysql_ping.

See http://lists.mysql.com/mysql/190441 and 
http://bugs.mysql.com/bug.php?id=14057
http://bugs.mysql.com/bug.php?id=2845

Dieter Mauer suggests the right thing is to catch the exception and then 

   reopen the connection (usually the "db" object has all necessary
   information) and then raise an exception derived from
   "ZODB.POSException.ConflictError" (in order to let your request
   be repeated).
 
The problem appear to be present in 4.0.XX and 4.1.XX.  Is it still there 
in MySQL 5.0.  And does MySQL-Python and ZMYSQLDA grock MySQL-5.0?

-d


On Mon, 16 Jan 2006, Dennis Allison wrote:

> I have been seeing occasional "release unlocked lock" errors from a 
> storage error in a two-phase commit which really comes from a "Lost 
> connection to MySQL server during query".  Apparently this arises from 
> a failure of self.db.ping() to find a connected database as the 
> transaction is opened.
> 
> It is possible that the connection has really timed out.
> 
> Looking at the code it appears that ZMySQLDA does not attempt to 
> recreate the connection.  Is that correct? 
> 
> What's the recommend approach to re-establish the connection?
> 
> -d
> 
> 

-- 


___
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] Autoconnect with ZMySQLDA 2.0.9

2006-01-16 Thread Dennis Allison
I have been seeing occasional "release unlocked lock" errors from a 
storage error in a two-phase commit which really comes from a "Lost 
connection to MySQL server during query".  Apparently this arises from 
a failure of self.db.ping() to find a connected database as the 
transaction is opened.

It is possible that the connection has really timed out.

Looking at the code it appears that ZMySQLDA does not attempt to 
recreate the connection.  Is that correct? 

What's the recommend approach to re-establish the connection?

-d

-- 

___
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] Re: Handling login failures

2006-01-12 Thread Dennis Allison

A more usual solution to this issue is to insert a delay after the third
and subsequent failures.  You, of course, need a policy for removing the 
delay (successful login or N minutes following the last attempt).


On Fri, 13 Jan 2006, Florent Guillaume wrote:

> Håkan Johansson wrote:
> > I want to be able to block a user from logging in if he fails to give 
> > the right login/password three times in a row. 
> 
> You're aware that this allows anyone to trivially DoS your users, right?
> If you take the precaution of matching with the IP, it still will harm 
> people logging in through corporate or ISP proxies. Which, admittedly, 
> may not be a problem in an intranet setting.
> 
> Florent
> 
> > The problem is that I  don't know how to do this.
> > 
> > First, I need to know if an attempt failed. This, I have no idea how to do.
> > 
> > Second, I need to block the user without deleting him. One problem here 
> > is that the user can write different login names for the different login 
> > attempts. We have been thinking about blocking the offender's IP for 30 
> > minutes or so and leave it at that. It seems to me that 
> > SiteAccess.AccessRule could be used for that, but I haven't looked much 
> > into it yet. The documentation is extremely light.
> > 
> > 
> > I have a very clean Zope 2.8.4 installation on a SuSE linux machine.
> > Logins are handled in the standard Zope way, nothing special added.
> > The Zope is running as a stand alone server, i.e. no Apache at all.
> > 
> > 
> > Another thing: How do I get Zope to log failed authentication attempts? 
> > Neither event.log or Z2.log shows anything. As Z2.log is the access log, 
> > I would have guessed that such things should be logged there. If not, 
> > where and how?
> 
> 
> 
> 

-- 

___
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] Deadlock Debugger with Zope 2.8.5

2006-01-01 Thread Dennis Allison

DeadlockDebugger-1.0 causes the following log entry 

2006-01-01T00:22:38 ERROR DeadlockDebugger Incorrectly installed 
threadframe module

with Zope 2.8.5.  Any thoughts as to the problem?



___
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] More on understanding conflicts

2005-12-21 Thread Dennis Allison

The side effect is that sessions will live longer than the specified 
period, up to 300 seconds longer if session-resolution-seconds is set to
30 seconds.

In my case, setting it higher helps, b ut does not eliminate the problems.

On Wed, 21 Dec 2005, Maciej Wisniowski wrote:

> 
> >The missing detail here is that reading a session object causes a
> >write to the database to update the last access time for that session
> >object. So what looks like a plain old read to the application code
> >above, in-fact includes a write just below the surface. (This is a
> >design choice so that stale session objects can be removed.)
> >  
> >
> Some time ago (search the archives) I had problems with high rate
> of write conflict errors and then Michael Dunstan has written:
> 
> "One option to reduce the rate of this write conflict is to tune the
> session machinery to suit. For example use session-resolution-seconds
> of say 300 seconds."
> 
> It helped me a lot - almost no conflict errors :) Maybe you should
> try to change this setting in zope.conf and see what will happen.
> 
> Im curious if there are side effects of setting high value to this
> variable? I haven't noticed any...
> 
> 

-- 

___
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] More on understanding conflicts

2005-12-21 Thread Dennis Allison

Michael -- 

You raise an interesting point.  We use sessions to hold the
volatile state for each user in a highly interactive, highly personalized
site. A session lasts from login until logout or until there has been no
activity for a long time.  Perhaps, if I were to simply excise the session
timeout mechanism and the write of the last access time all would be well.  
We do not use session timeouts and could easily handle the recovery in a 
different way.

I have changed the WRITEGRANULARITY and other parameters to be more 
comensurate with our long session times.

I have begun to think that the Zope session variable mechanism, as
implemented, addresses a different part of the storage spectrum than we
need.  A small number of per user parameters (3 to 10) are used by almost
every request. Most of the parameters are set at user login and are not
changed for the duration of the session; sessions can last a long time, up
to ten hours, say, Some of the parameters change more rapidly, for
example, those that capture the current navigation state.  It may be that
we need two different kinds of session data, one for login-static data and
another for dynamic data.

I'm still working on getting some detailed traceback information,
difficult when the problems occur only infrequently on loaded production
systems with a 24x7 service profile.  We are moving to Zope 2.8.5 to take
advantage of the better conflict reporting.

On Thu, 22 Dec 2005, Michael Dunstan wrote:

> On 12/22/05, Dennis Allison <[EMAIL PROTECTED]> wrote:
> > The issue here has had to do with session variables and their iteraction
> > with the persistence mechanism and conflicts and multiple threads for the
> > same session.  Chris McDonough has pointed out that session variables can
> > cause writes and write conflicts even if the only Zope level access is a
> > read.  I thought MVCC works out of the box for Zope 2.8.4 which uses ZODB
> > 2.3.4. Am I wrong?
> >
> > The real surprise was that you can get a write conflict from a pair of
> > session variable reads!
> 
> The missing detail here is that reading a session object causes a
> write to the database to update the last access time for that session
> object. So what looks like a plain old read to the application code
> above, in-fact includes a write just below the surface. (This is a
> design choice so that stale session objects can be removed.)
> 
> There are implementation details of TransientObject that attempt to
> mitigate some of the pain:
> 
> - The access time has a WRITEGRANULARITY. That can help a bit by
> avoiding writing altogether some of the time. But still there is need
> to write (and so potential contention) each time a boundary of that
> granularity is crossed.
> 
> - And _p_resolveConflict of TransientObject will most often pick a
> state to avoid a conflict error. When it does there is the performance
> cost of writing to database but there will be no ConflictError.
> However, I've suggested in the past that you should comment out
> _p_resolveConflict while debugging consistency problems. What is the
> current state of your _p_resolveConflict now? _p_resolveConflict
> includes a DIWM'ly component. Perhaps you still need to avoid that
> component of _p_resolveConflict? In that case a _p_resolveConflict
> could be engineered that can resolve the case of just updates to the
> access time? But still bails out when presented with two states that
> have explicit updates to maintain consistency.
> 
> Though that's all just conjecture till we see your tracebacks for your
> conflicts.
> 
> michael
> 

-- 

___
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] More on understanding conflicts

2005-12-21 Thread Dennis Allison
On Wed, 21 Dec 2005, Chris McDonough wrote:

> On Dec 21, 2005, at 11:38 AM, Dennis Allison wrote:
> 
> >
> > Chris,
> >
> > You asked about frames a while back and I responded in the  
> > affirmative.
> > I am sure I mentioned that we use frames and framesets and  
> > explained that
> > we use a bit of Javascript to manage loading individual frames  
> > rather than
> > loading the entire frameset whenever possible.
> 
> Eek.  Sorry, I don't remember this.  Context is hard to keep over the  
> course of several weeks/months, of course.  And my brain is going  
> with my age.  I don't mean to be a nag (really, I understand this is  
> hard), but I asked two emails ago "do you use frames?" and you didn't  
> answer that question directly in your response at all; only by way of  
> teasing it out of you by asking if it was an IFRAME in a followup was  
> the fact that this app is a frame-based one re-revealed to me.   In  
> general, it would be very helpful if you could answer the questions  
> that are asked when they're asked even if they reveal the fact that  
> I'm a doddering old man and can't remember things from moment to  
> moment,  Otherwise it's difficult (and honestly a bit frustrating) to  
> try to help you.

Sorry if I appeared unresponsive--the fact that we use frames is hardly a 
secret.   I suppose that it would be helpful to make up soem summary of 
features for ongoing threads like this one.  

> 
> In any case, typically the problem with frames only reveals itself  
> when the entire frameset is loaded or the body of one frame causes  
> the other frames to load.  Your javascript may not be helping here...  
> it could be hurting.  For example, if a user reloads the "main" frame  
> (say as a result of a POST request) and by doing so, during its re- 
> rendering, it causes two other frames to refresh themselves due to an  
> inline script function in the body of the main frame, that's the  
> moral equivalent of reloading the frameset entirely.  You have a tiny  
> bit more control, e.g. maybe you could set a Javscript timer to  
> reload the other frames in a "staggered" way where you reload one,  
> then the other after a certain number of seconds.  But otherwise it's  
> the same problem.  Hard to know what's going on there.

By convention the primary content frame does not cause other frames to 
re-render but there are multiple implementors and creaping featurism
which may have changed that.  The navigation_box frame we have been 
discussion gets re-rendered on a navigation change (duh) and may initiate
re-rendering of a tabs_frame.  Except for the full frameset rendering,
we are likely to be fairly conflict clean.  I can look in the logs and 
tell...  Might be interesting.


> >   Still, your point about
> > the multiple threads due to the requests from individual frames when a
> > frameset gets rendered is a valid one and one I have not given the  
> > weight
> > it deserves.
> >
> > Issues around multiple threads and concurrency is going to be more and
> > more of a problem as we move to smarter clients and AJAX-like
> > implementations.
> 
> "Smart clients" perhaps.  But Ajax is supposed to allow you to do  
> interesting things *without* reloading the page, and because (to my  
> knowledge) no current Javascript implementation can make a request  
> asynchronously, so you can only make one request at a time from  
> within a given browser document.  So using Ajax shouldn't cause  
> *more* conflicts; it should cause fewer.  Unless of course your Ajax  
> calls emanate from different frames (different DOM "documents").   
> Then you're back in the same boat (depending on the Javascript  
> implementation, I suppose).  It's really a problem with frames (or  
> more generally, multiple documents at the same time) rather than with  
> Ajax.

I did not know that XMLHttp interactions were asynchronous but serialized.  
Most browsers can make multiple simultaneous requests so I'd assumed that 
XMLHttp would just grab a connection and go and that multiple requests 
can be in progress simultaneously.

> > It looks like there are several small things I can do to improve the
> > present system's conflict rate, but, absent some major structural  
> > changes,
> > I won't be able to drive them to O(zero).  Fortunately, while the  
> > level of
> > conflicts is high, they are infrequent relative to the number of hits
> > served, and most are resolved by the normal Zope conflict resolution
> > mechanism.
> 
> Well, that's good.  Does that mean I'm off the hook? ;-)

N

Re: [Zope] More on understanding conflicts

2005-12-21 Thread Dennis Allison

Chris W,

The issue here has had to do with session variables and their iteraction
with the persistence mechanism and conflicts and multiple threads for the
same session.  Chris McDonough has pointed out that session variables can
cause writes and write conflicts even if the only Zope level access is a
read.  I thought MVCC works out of the box for Zope 2.8.4 which uses ZODB
2.3.4. Am I wrong?

The real surprise was that you can get a write conflict from a pair of
session variable reads!

Sorry, I wasn't all that clear when I had my epiphany about REQUEST and
transactions.  You said it much more clearly and precisely.  Since
conflict errors are discovered and managed when the publisher commits,
there is not a whole lot one can do, in terms of code organization, to
minimize the potential for conflicts.

Thanks for your insight.

On Wed, 21 Dec 2005, Chris Withers wrote:

> Dennis Allison wrote:
> > Ah so desu.  That's the conceptual hook I was missing.  Only one
> > transaction per request and no subtransactions!  
> 
> ZODB substransactions won't help you here in the slightest...
> 
> > A transaction is
> > processing initiated by a client request or a redirect. (Anything else?)  
> > A transaction has its own REQUEST and RESPONSE objects.
> 
> Wrong way round. Each REQUEST has one RESPONSE associated with it, and 
> the publisher does either a transaction commit, if no errors occur, or a 
> transaction abort, if errors occur, once it has processed a REQUEST. 
> Read conflict errors can be raised at any time, but shouldn't really 
> occur once you have MVCC working. Write conflict errors only happen 
> during transaction commit. The publisher retries the whole request if a 
> conflict errors of either sort occurs. If the retry fails 3 times, it 
> gives up, aborts the transaction and reports the conflict error to the 
> end user by way of writing to the response object.
> 
> hth,
> 
> Chris
> 
> 

-- 

___
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] More on understanding conflicts

2005-12-21 Thread Dennis Allison

Chris, 

You asked about frames a while back and I responded in the affirmative.  
I am sure I mentioned that we use frames and framesets and explained that
we use a bit of Javascript to manage loading individual frames rather than
loading the entire frameset whenever possible.  Still, your point about
the multiple threads due to the requests from individual frames when a
frameset gets rendered is a valid one and one I have not given the weight
it deserves.

Issues around multiple threads and concurrency is going to be more and
more of a problem as we move to smarter clients and AJAX-like
implementations.

It looks like there are several small things I can do to improve the 
present system's conflict rate, but, absent some major structural changes,  
I won't be able to drive them to O(zero).  Fortunately, while the level of 
conflicts is high, they are infrequent relative to the number of hits
served, and most are resolved by the normal Zope conflict resolution 
mechanism.


On Wed, 21 Dec 2005, Chris McDonough wrote:

> On Dec 21, 2005, at 10:32 AM, Dennis Allison wrote:
> > Thanks again Chris for the helpful comments.
> >
> > The navigation_box, in this context is just a table which is rendered
> > into a frame in our standard frameset.  It is not an iframe.
> 
> So you do use frames!  That's a huge clue.  I wish I didn't feel like  
> I had to drag that out of you. :-(
> 
> > In the sense I used them below, a transaction and a request are the  
> > same
> > thing.  This follows from the fact that each request is managed as a
> > single transaction.  Perhaps it would have been a better choice of  
> > words
> > to use "request".
> >
> > I suggested breaking the request into two requests as one way to help
> > manage conflicts.  Only the first part of the the split request would
> > reference the session variables, so the window of opportunity for a
> > session variable conflict would be smaller even though the number of
> > requests is larger.
> 
> This is probably not really a reasonable thing to do.  A request is  
> generated by a user agent.  With a lot of deep dark magic, you *can*  
> generate a request from within Zope that makes it appear that it  
> comes from the outside, but it's not easy and unhelpful here.   
> Remember what I said about the "write on read" pattern of sessions?   
> it doesn't matter if you're "only reading" session data.  There still  
> may be writes happening.   Breaking things up into more requests will  
> not help.
> 
> What you want to do instead is *not access the same session from two  
> different requests at the same time*.  You probably know this, but  
> when a frameset is used, the browser generates N requests... one per  
> frame.  These requests happen at about "the same time" whenever the  
> frameset is accessed by a user.  Moreover, since the requests come  
> from the same browser, the session identifier for both requests is  
> the same.
> 
> By accessing session data from code within more than one frame, you  
> are essentially creating a situation where at least two different  
> threads will always be accessing the very same session object  
> whenever the frameset is rendered.  For as many frames as are in the  
> frameset, if the code that renders each frame access the session, a  
> transaction will touch the same session data object and perhaps some  
> shared housekeeping data structures.  It's as if you're pressing the  
> "refresh" button in rapid succession on a page that accesses session  
> data.  This is prime area for a conflict.
> 
> > And, sigh, you are probably right--it may be time to abandon the  
> > standard
> > release session implementation and roll our own.
> 
> This is still a reasonable thing to do, but if you can get away with  
> using sessions in only *one* of the pages of your frameset, things  
> will get much better.
> 
> - C
> 

-- 

___
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] More on understanding conflicts

2005-12-21 Thread Dennis Allison

Thanks again Chris for the helpful comments.  

The navigation_box, in this context is just a table which is rendered 
into a frame in our standard frameset.  It is not an iframe.

In the sense I used them below, a transaction and a request are the same
thing.  This follows from the fact that each request is managed as a
single transaction.  Perhaps it would have been a better choice of words
to use "request".

I suggested breaking the request into two requests as one way to help
manage conflicts.  Only the first part of the the split request would 
reference the session variables, so the window of opportunity for a 
session variable conflict would be smaller even though the number of 
requests is larger.  

And, sigh, you are probably right--it may be time to abandon the standard 
release session implementation and roll our own.


On Wed, 21 Dec 2005, Chris McDonough wrote:

> >> Write conflicts happen for a transaction.  In Zope, there is one
> >> transaction per request.
> >
> > There are two distinct sections to the navigation_box transaction.
> 
> There's a transaction for something named "navigation_box"?  Is this  
> an IFRAME?
> 
> >   One
> > where the session variables are read and a second where they are  
> > used. To
> > minimize conflicts, the what is now a single tranaction should be  
> > split
> > into two separate transactions.
> 
> Are you maybe misusing the term "transaction" here?  If this logic  
> all happens in the course of a single request, it all happens in the  
> same transaction unless that request causes, say, the reload of a frame.
> 
> There is a concept of a transaction here.  But it doesn't have  
> anything to do with what happens during the course of a single  
> request unless you explicitly try to control transactions, which is  
> almost never a good idea.
> 
> > Any thought as to how to do that?  If navigation_box were broken into
> > two separate methods, say nav_box1 and nav_box2, how does nav_box1
> > commit itself and then transfer control and data (a session variable
> > snapshot) to nav_box2 as a new transaction?
> 
> I suspect I don't understand what this would achieve.  Having more  
> transactions will cause more conflicts.  Conflicts happen as a result  
> of conflicting changes in two transactions.
> 
> > I would guess that if nav_box1 redirects to nav_box2 a new transaction
> > is initiated and the old one committed.  Is that correct?  And is  
> > there
> > a better way to get the same effect?
> 
> I have no idea, sorry.
> 
> I think maybe what you might want to do here is to not use builtin  
> Zope sessions. ;-)  Zope sessions rely on ZODB and are  
> transactional.  If they didn't rely on ZODB, you wouldn't be getting  
> conflict errors.  If they weren't transactional, you probably  
> wouldn't notice.
> 
> Might be time to cut bait here.  We've been talking about this for  
> months. ;-)  I think someone wrote a relational database backend for  
> the sessioning API some time ago.  You may want to give that a shot.
> 
> - C
> 

-- 

___
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] More on understanding conflicts

2005-12-20 Thread Dennis Allison

One more thought ---

On Wed, 21 Dec 2005, Chris McDonough wrote:

> > The structure of the method is simple enough: there is a large  
> > 
> > block which populates local variables with data from the session
> > variables
> >
> >  >  ...
> >>
> > 
> > with the body of the  containing 300 lines or so of dtml,
> > control code, sql queries, and occasional dtml-let blocks to hold
> > query results and computed values.
> 
> If this is the same getSessionVariable as you reported before (a  
> Python Script), note that each call that you make to it has  
> overhead.  It might be better to create a single Python script to  
> return all of the values that you need from the session rather than  
> calling this over and over again.  If that doesn't work, it might be  
> even better to just do SESSION.get('foobar') instead of calling a  
> Python Script for every value.
 ...
> Write conflicts happen for a transaction.  In Zope, there is one  
> transaction per request.  

There are two distinct sections to the navigation_box transaction.  One
where the session variables are read and a second where they are used. To
minimize conflicts, the what is now a single tranaction should be split 
into two separate transactions.

Any thought as to how to do that?  If navigation_box were broken into 
two separate methods, say nav_box1 and nav_box2, how does nav_box1 
commit itself and then transfer control and data (a session variable 
snapshot) to nav_box2 as a new transaction? 

I would guess that if nav_box1 redirects to nav_box2 a new transaction 
is initiated and the old one committed.  Is that correct?  And is there 
a better way to get the same effect?



___
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] More on understanding conflicts

2005-12-20 Thread Dennis Allison

Chris, thanks again.   You've clarified several issues. Interlinear 
comments below, original text edited with a heavy hand for brevity...

On Wed, 21 Dec 2005, Chris McDonough wrote:

> 
> If this is the same getSessionVariable as you reported before (a  
> Python Script), note that each call that you make to it has  
> overhead.  It might be better to create a single Python script to  
> return all of the values that you need from the session rather than  
> calling this over and over again.  If that doesn't work, it might be  
> even better to just do SESSION.get('foobar') instead of calling a  
> Python Script for every value.

Good point. No overhead is probably the right thing especially since 
there are no subtransactions.
> 
> 
> > I still don't have an intuitve understanding of the conflict  
> > mechanism in
> > practice.  For example, Why is the conflict error reported for the
> > navigation dtml method rather than for the getSessionVariable python
> > script which actually references the SESSION object where the conflict
> > occurs?
> 
> Write conflicts happen for a transaction.  In Zope, there is one  
> transaction per request.  So it reports the URL of the method that  
> was called as the thing that caused the conflict (because, basically,  
> it was).  A conflict is not "noticed" until a transaction is  
> committed; ZODB has no idea what caused the data structure to change  
> in a conflicting way within "application code".

Ah so desu.  That's the conceptual hook I was missing.  Only one
transaction per request and no subtransactions!  A transaction is
processing initiated by a client request or a redirect. (Anything else?)  
A transaction has its own REQUEST and RESPONSE objects.

> > A conflict error gets raised whenever another thread references the
> > same session's SESSION object.
> 
> Are you using frames by any chance?  It would be understandable that  
> you're seeing an increased number conflicts if you have an  
> application in which many threads try to access the same session  
> object at once due to a browser making multiple writes to the same  
> session object because of frames.

Yes, we do use frames.  We manage rendering explicitly with a bit of 
Javascript magic so the full frameset rarely gets rerendered.  But, it 
certainly could be a contributing factor.

> 
> >   Apparently the MVCC read-read conflict
> > resolution fails for session variables although I am not sure why.
> 
> Can we see one of the conflict tracebacks?  You should be seeing only  
> write conflicts.  Read conflict errors are reported in a traceback  
> with a ReadConflictError message (conflicts reported as only  
> ConflictError are write conflicts).
> 

I'll try to find a few tracebacks.

-- 

___
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] More on understanding conflicts

2005-12-20 Thread Dennis Allison
Zope 2.8.4
ZODB 3.4.2


I have a dtml method which is an obvious hotspot.  It puts up navigation
wigetry and is rendered on nearly every page.  The logs show it generates
a large number of conflicts.  The conflicts are in TemporaryStrorage and
so are due to session variables.

The session variables are accessed with short Script(Python) functions
one call per session variable used: getSessionVariable( var ),  Session 
variable hold mostly data that is constant throughout the session.  There 
are about twenty values, ten of which are referenced in the navigation 
method.

The structure of the method is simple enough: there is a large 
block which populates local variables with data from the session 
variables   



with the body of the  containing 300 lines or so of dtml, 
control code, sql queries, and occasional dtml-let blocks to hold 
query results and computed values.

So, this navigation method is clearly a good candidate for refactoring,
but the question is "What's the best way to refactor it?".

I still don't have an intuitve understanding of the conflict mechanism in
practice.  For example, Why is the conflict error reported for the
navigation dtml method rather than for the getSessionVariable python
script which actually references the SESSION object where the conflict 
occurs?
 
A conflict error gets raised whenever another thread references the same
session's SESSION object.  Apparently the MVCC read-read conflict
resolution fails for session variables although I am not sure why.  The
DEBUG logs indicate that read-read conflicts found.  It would be helpful
to understand why.

When the conflict is resolved, one is backed out (everything is 
transactional) and restarted.  After three retries, it is considered 
an error.   This processing is handled automatically by Zope.

At one point, I had considered writing a custom conflict resolution
function where resolution assumed independence of individual session
variables.  After some thought and experimentation, I concluded that was a
bad idea because it could break synchronization assertions between session
variables (e.g., X is twice Y).

Absent a magical conflict resolution method, the best approach would seem
to be to minimize the potential for conflicts.  Intuition says that the
simplest way to do this would be to have the navigation dtml method make a
single call to a python script, getSessionVariables, which would return a
copy of the session variables. The copy could then be unpacked and 
processed without any potential conflict errors.



 



___
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] Re: [Zope-dev] Re: sessions in the presence of conflicts

2005-12-19 Thread Dennis Allison

The interaction between sessions, conflicts, and persistence is a bit
confusing.  I am still trying to understand the code in depth.  

One thing is for sure, request.SESSION and/or request['SESSION'] must be
persistent for things to work.  Mutable objects in the session variable
set (dictionaries and lists) have to be handled specially to get the
persistence machinery to recognize they have been changed.

In this case, I am trying to ensure that the session variables get 
identified as persistent.  My question is whether using update (an 
implicit assignment) triggers the persistence mechanism.  It is the 
moral equivalent of writing 

request['SESSION']['alpha'] = 'a'B
request['SESSION']['beta'] = 'b'

but I am unsure whether the persistence mechanism will recognize it as 
such.  

Doing session variable initialization in a Script(Python) object has a
downside because one cannot set a _p_changed attribute and so must rely on
the assignment paradigm.  Perhaps the interface should be in a Product or
External Method which is less constrained.

Anyhow, David, thanks for the assist.


On Mon, 19 Dec 2005, David H wrote:

> Dennis Allison wrote:
> 
> >Chris McDonough identified a persistence problem with the routine(s) that 
> >manage sessions variables.  (Thanks Chris)  I have put the correction in 
> >place which resolved some (but not all) of the problems.
> >
> >There are still problems which are apparently due conflicts in accessing
> >the session variables.  To minimize frequency of conflicts, I am rewriting
> >several routines using Dieter's rules of the thumb (Thanks Dieter).
> >
> >One routine being modified is a Script(Python) that initializes a number
> >of session variables.  I am collecting the session values in a dictionary
> >and then use update to set their value, for example:
> >
> > s = {}
> > s['alpha'] = 'a'
> > s['beta'] = 'b'
> > request['SESSION'].update(s)
> >
> >Is the persistence machinery smart enough to detect this as a change?  I
> >suspect that it has to be flagged since the assignment won't be seen.  
> >Usually this means setting the _p_changed=1 attribute, but it is not clear
> >to me where to set it in this particular context.  
> >

> Dennis,
> 
> Did you means request['SESSION']['someDictionary'].update(s)?
> Anyway your idea seems correct - The SESSIONS chapter (at least on 
> plope.com) addresses SESSION "staleness" and mutable objects.
> 
> 1) someDict = SESSION['someDict']
> 2) someDict['someKey'] = "newValue"
> 
> But (2) does not guarentee that a subsequent lookups like:
> SESSION['someDict'] will return "newValue".
> 
> But this WILL:
> 3) SESSION['someDict'] = someDict.
> 
> Which looks like your example.  How this connect to your primary issue:  
> *conflicts* is not clear to me.  :-\
> 
> David
> 
> 

-- 

___
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] Re: [Zope-dev] Re: sessions in the presence of conflicts

2005-12-19 Thread Dennis Allison

Chris McDonough identified a persistence problem with the routine(s) that 
manage sessions variables.  (Thanks Chris)  I have put the correction in 
place which resolved some (but not all) of the problems.

There are still problems which are apparently due conflicts in accessing
the session variables.  To minimize frequency of conflicts, I am rewriting
several routines using Dieter's rules of the thumb (Thanks Dieter).

One routine being modified is a Script(Python) that initializes a number
of session variables.  I am collecting the session values in a dictionary
and then use update to set their value, for example:

s = {}
s['alpha'] = 'a'
s['beta'] = 'b'
request['SESSION'].update(s)

Is the persistence machinery smart enough to detect this as a change?  I
suspect that it has to be flagged since the assignment won't be seen.  
Usually this means setting the _p_changed=1 attribute, but it is not clear
to me where to set it in this particular context.  






-- 

___
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] Re: Triggering the persistence mechanism

2005-12-15 Thread Dennis Allison

Yes, I understand that.  This is a development and code organization 
issue.

>From the developer's point-of-view there is a special namespace called 
session variables.  What I want to be able to do is have the coders 
call 

getSessionVariable(name) 

to get the current value of the session variable and 

setSessionVariable(name, value) 

to save the value.  The type of the variable should be transparent to the 
programmer--that is, it could be a number, a string, a dictionary, or a 
list.

My question restated: Is there a way to write a generic 
setSessionVariable()routine that handles the mutated values properly
for arbitrary types.

That is, does something like 

def setSessionVariable( name, value ):
request = container.REQUEST
session = request.session
a = session.get(name,0) 
a = value
session[name]=a

manage persistence correctly if value is a dictionary or a list
and mutated from the old value, whatever it may have been.  Or is it 
necessary to specifically include an assignment for each mutated 
component of the dictionary or list?

What happens when the value to be stored is a dictionary of dictionaries
of lists and has been mutated?

Is there an advantage to using the persistent Dictionary and List classes 
in the session rather than ordinary ones?

Thanks again for your insight.


On Thu, 15 Dec 2005, Chris McDonough wrote:

> There is nothing that needs to be done here.  It's only if you  
> *mutate* values stored in the session that you need to do explicit  
> persistence triggering.  I provided an example of doing this in my  
> last email.
> 
> - C
> 
> On Dec 15, 2005, at 4:20 PM, Dennis Allison wrote:
> 
> >
> > Chris McDonnough pointed out a problem with my setSessionVariable
> > code which I am now fixing.  I want a generic routine to set a session
> > variable whether it is a simple variable, a list, or a dictionary.
> >
> > The question is one of triggering the persistence mechanism.  If a
> > dictionary or list is stored in a session variable, what is needed to
> > ensure that the setSessionVariable() routine triggers the persistence
> > mechanism?
> >
> > Is it adequate to simply read the session variable in the
> > setSessionVariable() routine prior to writing it when the session  
> > variable
> > is a dictionary or list?  Or is something else needed?
> >
> >
> >
> >
> 

-- 

___
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] sessions in the presence of conflicts

2005-12-14 Thread Dennis Allison

Hi Davids.  Thanks for your note.  I remember your post. 

No, I have not used HappySession although we looked at it when we started.  
When we started development, sessions had just become part of the standard
release Zope and we decided that in the long run we'd be better off using 
the release product.

As I've said in other posts, we use the session mechanism fairly heavily.  
We have O(200) simultaneous interactive users each of whom has 40 or so 
session variables which maintain the dynamic state of their instance.  
Nearly every substantive operation touches one or more session variables.
Everything works most of the time,  but the error frequency is high enough 
for it to be of concern.

I'm a bit cautious about moving to another sessioning system on a 
sizable production system running 24x7.  

> >  
> >
> Dennis,
> Im only curious and this is no recommendation ... and I asked this on 
> the list maybe a year ago (and got zero reponses)
> 
> Have you given "HappySession" a try?  Has anyone? I've never had a 
> problem with it, but then its never been under much load and is no 
> longer actively supported (least last time I checked).
> 
> I converted back and forth between Zope SESSION and HappySession (for 
> reasons of  legacy code).  Their interfaces have just few differences, 
> e.g., HappySession['this'] returns None (if 'this' is not a key) and 
> SESSION raises an exception.  That type of thing.
> 
> HappySession  does not read/write to zodb (if I recall it stores session 
> data in RAM (session) cookies).  I just do not know if its otherwise up 
> to your requirements.
> 
> All best,
> David
> 
> 
> 
> 

-- 

___
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] sessions in the presence of conflicts

2005-12-14 Thread Dennis Allison

Zope 2.8.4, ZODB 3.4.2

I am still trying to resolve a "session variables in the presence of
conflicts" problem.  The observed symptom is that suddenly either some
session variables disappear or all session variables disappear.  In both
cases, Zope has raised a KeyError exception for the a particular session
variable because it is not present and an attempt was being made to access
it from the session.

The cause appears to be related to the presence of a conflict error and a
botched recovery, but the exact mechanism remains a mystery.

Zope equates a session object with a TransientObject.  For our instance,
that's fine, since our only TransientObject is a session.  For the general
case, I would have thought a SessionObject inheriting from TransiendObject
would have been used so that conflict resolution for sessions could be
easily specialized.

The conflict resolution for a TransientObject (that is, a Session Object)
is clearly suboptimal.  In the next paragraphs I'll review what is 
currently done and then propose a different approach which I am about to 
implement for our systems.  Comments, corrections,  and suggestions much 
appreciated.

_p_resolveConflict(self, oldState, savedState, newState) 

returns the state of the object after resolving different changes.  The 
arguments are:

   oldState   -- state of the object at the beginning of the current 
 transaction (mutable)
   savedState -- state currently stored in the database.  This state 
 was written after oldState and reflect changes made
 by a transaction that committed before the current
 transaction (immutable)
   newState   -- state after changes made by the current transaction 
 (immutable)

The standard conflict resolution for a TransientObject resolves according
to the following rules:

   1.  if any of the states are invalid (that is, has a key '_invalid')
   return the invalid state.

   2.  if any any of the attributes ['token','id','_created'] differ then 
   there is a conflict, raise the conflict exception.

   3.  choose the state most recently modified, if possible.

   4.  otherwise, choose the state most recently accessed.

It seems to me that we can do much better for sessions because we know a
bit about the semantics of sessions.  A session object is a
dictionary-like object mapping key-value pairs.  Adding or deleting keys
or changing the value associated with a key are independent operations and
do not conflict unless the keys are duplicated in both the transactions.  
Any conflict resolution mechanism needs to be able to manage multiple keys
independently since the session object is modified as a unit.   In 
addition, new keys may be added and old keys deleted; any conflict 
resolution mechanism at the key level needs to be comprehend those 
operations.

A more session-friendly conflict resolution might use:

   1.  if any of the states are invalid (that is, has a key '_invalid')
   return the invalid state.

   2.  if any any of the states attributes ['token','id','_created']
   differ then there is a conflict, raise the conflict exception. 

   3.  order the newState and savedState by modification time (or if that
   cannot be computed, by access time).   

   4.  any key appearing in oldState's dictionary but not appearing in 
   both savedState and newState should be removed from all.  This 
   corresponds to a key-value pair being deleted in one of the 
   transactions.  Insertions will be managed automatically by 
   the updates.

   5.  beginning with the oldest, update oldState dictionary of key-value 
   pairs using the dictionary part of newState and savedState.  Return 
   oldState.

This does several things.  First, it captures independent key-value
changes made in both potentially conflicting transactions.  Second, it
provides a reasonable ordering for multiple (potentially conflicting)
key-value pair updates.  Third, it manages insertions and deletions to the
session variable set in the presence of conflicts.

Does this make sense?  I have yet to figure out how to map a
TransientObject "state" back to the object it represents, but it clearly
is possible.









___
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] Recursive Display Of All Folder Items

2005-12-13 Thread Dennis Allison

Read the documentation for .  You should be able to use it 
to generate the information you want.

On Tue, 13 Dec 2005, J Cameron Cooper wrote:

> Francisco Chamorro wrote:
> > Hi everyone, I am trying to get a dump of all the content currently in 
> > our zope server.  Using DTML I was able to get the top level folders to 
> > display their content but I am unable to recursively display the 
> > contents of the sub-folders.
> > 
> > This is the code I am using for my top level folders, where "TV" is the 
> > name of the folder I want to display.
> > 
> > 
> > 
> > 
> > My second attempt at displaying sub-folder content was the following:
> > 
> > 
> > id: ,
> > type: 
> > 
> > 
> > id: ,
> > type: 
> > 
> > 
> > 
> > 
> > But that also fails.  I searched the documentation and found a post 
> > about recursively calling the same function but that did not work as I 
> > get a "excessive recursion" error. Any help on this problem would be 
> > greatly appreciated.
> 
> objectValues is acquired on all objects, even non-folderish ones. Thus 
> recursion never stops. You must ask for it explicitly: 
> aq_inner.aq_explicit or something like that if I remember directly.
> 
>   --jcc
> 

-- 

___
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] resolving conflict errors

2005-12-10 Thread Dennis Allison

Thanks, I'll take a look.  I don't have much faith in getting to 
do it with the live system, but maybe I can find a way to get some
sort of testbed. 


On Sun, 11 Dec 2005, Michael Dunstan wrote:

> On 12/11/05, Dennis Allison <[EMAIL PROTECTED]> wrote:
> >
> > Good idea, but it is hard to do in a production environment with a "never
> > lose data" model.
> 
> Have a go at recreating the problems you are seeing on a development
> host. SessionRig can be used to mount a brute force attack of the
> session machinery. You'll need to tune that somewhat to your
> particular application.
> 
>   http://cvs.zope.org/Packages/SessionRig
> 
> michael
> 

-- 

___
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] resolving conflict errors

2005-12-10 Thread Dennis Allison

Good idea, but it is hard to do in a production environment with a "never
lose data" model.  I have suspected the p_resolve_conflict which is
clearly wrong for our model and am in the process of trying to rewrite it
to take advantage of the semantics of sessions as we use them.

The problem I am tracking manifests itself as KeyErrors in the session 
data structure.  The session structure is used pretty much out of the box.
Reading is done any which way (e.g,  REQUEST['SESSION'][key]) but writing 
always uses a copy out of the session object, an update of the session 
object, and the a replacement of the session object back into REQUEST.

The session data we lose are generally strings, for example, a user_id.
For example, we can set the user_id into the session to a value, and then 
later, when we reference the session variable, we get a KeyError.  While
there is no direct causal tie, we suspect this is related to an 
intervening conflict error.   

Occasionally the entire SESSION data container disappears.  At other
times, we get a KeyError exceptions for one or more session variables.

I have been trying to understand in detail the management of the session
variables.  I can see how accesses are managed in ZPublisher/HTTPRequest,
but I am still unsure of how that session data is maintained persistent
and how session data can generate read-read conflicts.  

I'll try your suggestion.  I also plan to monitor session variable access 
to determine whether the SESSION data whether a KeyError signals that all 
session variables are missing or whether only a few are missing.


On Sun, 11 Dec 2005, Michael Dunstan wrote:

> On 12/9/05, Dennis Allison <[EMAIL PROTECTED]> wrote:
> > The problem I am trying to resolve appears to be load related.  The
> > observed symptom is that (some) session variables spontaneously disappear.
> > There appears to be some connection to conflicts, but the exact mechanism
> > and the relationship is not yet clear.
> 
> A small possibility is that you are being bitten by the DWIM'ly nature
> of TransientObjects conflict resolution where the last modified state
> is chosen over the others. If you think this is biting you then try
> commenting out _p_resolveConflict of TransientObject. That's bound to
> increase the rate of conflict errors but should provide you with a
> consistent session state. Perhaps useful as a debugging step.
> 
> michael
> 

-- 

___
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 )


  1   2   >