[Zope] ZSyncer-0.71 problems
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@target-urltarget-port/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
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
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?
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 POST 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
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] Using buildout to distribute projects
Hi, I have a project that consists of an main package and several plugin packages. It is very nice and easy to set this up using buildout using the develop option. But I was wondering if it is possible to use buildout to create a distribution of my project. I want to have it generate egg files from my packages instead of linking to their source, so i can tar the whole buildout folder without my source and distribute that file. That would be really nice because users could just untar that file and call the scripts in the bin folder because all required eggs are available. Another reason for me to use eggs for my packages is that my main package has to send plugins eggs to remote hosts, to keep them up to date. Has anyone an Idea how to do this? Or is buildout not intended for that kind of distribution generation? thank you and best regards, Dennis Kempin signature.asc Description: This is a digitally signed message part. ___ 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
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, dtml-let someval=scripts.cleanfilename(cgivar1+'_'+cgivar2) --- methods that use someval --- /dtml-let 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 scr 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 string, line 1, in expression AttributeError: cleanfilename The failing line is (literally) dtml-let sname=scripts.cleanfilename(user_lastname+'_'+user_firstname) which is part of a dtml-let 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 dtml-in blocks which have internal try-except-else 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 dtml-var standard_html_header dtml-let sss=scripts.cleanfilename('able baker charlie ') dtml-var sss /dtml-let dtml-var standard_html_footer 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] acquisition failure puuzzle or maybe something else
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: zope@zope.org 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, dtml-let someval=scripts.cleanfilename(cgivar1+'_'+cgivar2) --- methods that use someval --- /dtml-let a pattern we have used in many places without a problem. In this particular case, Zope throws an error File string, line 1, in expression AttributeError: cleanfilename The failing line is (literally) dtml-let sname=scripts.cleanfilename(user_lastname+'_'+user_firstname) 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 )
Re: [Zope] Please Help - Extracting Info From ZEXP File
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
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
+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] All Of My Zope 2.6 Transactions Since 2/6/07 Are Gone!
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
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] Lost user credentials
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] Suggestion for an opensource barchart/piechart graphic package in python
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 )
[Zope] stop undo revisions?
Hi, is there any way of stopping zope from doing revisions in a particular folder of a site? I have hundreds of megas in seconds.. If not, how can I automize the packing of the zodb by a cronjob? Regards, Dennis ___ 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] Simple Item without undo revisions?
Actually it is not a folder but an object that subclasses SimpleItem, that I would like to stop from saving revisions. Maybe is there a base class that has not undo support but supports most other things? Dennis Hi, is there any way of stopping zope from doing revisions in a particular folder of a site? I have hundreds of megas in seconds.. If not, how can I automize the packing of the zodb by a cronjob? Regards, Dennis ___ 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-DB] Process one PloneFormGen request into many SQL tables
Hi Paul, Ok to tell you honestly the truth, as a beginner you should try to leave your fingers of zope 3 /alchemist. The learning curve is steep. You will have to learn about Zope 3 widgets, schemas, interfaces, adapters You have to know how to configure the mapper, have to know how to handle the mapped objects And there is a lot of automatic machinery in the background going on such as automatic interface generation, formlib machinery etc. you have to be aware of. I am currently writing my final project about it and to figure out all this it took me a lot of time Unfortunately I dont have much experience with Archetypes Widgets or PloneFormGen so I can't really help you. But what you could certainly do is to write a zope 2 filesystem product that uses archetypes widgets. I personally prefer not to use zsql methods since they include very special DTML systax and variables and stuff you dont need anywhere else. You can also query the database adapter directly when you have a product. Here an example: (conn is the db connection) sql = select max(a.idAmendment) as last_id from cyc_Amendments a resultset = conn.manage_test(sql) result = int(resultset[0][0]) Or learn how to use SQLAlchemy, it really is a usefull toolkit you can also use standalone. Dennis Paul Eipper escribió: (this list replies to authors instead of the list as default _ ) -- Forwarded message -- From: Paul Eipper [EMAIL PROTECTED] Date: 19/01/2007 13:52 Subject: Re: [Zope-DB] Process one PloneFormGen request into many SQL tables To: [EMAIL PROTECTED] Hi Dennis, I was referred to the alchemist product by the PloneFormGen dev, but unfortunatelly I found the documentation for it extremely lacking (as in nonexistant :P) Since I am only learning all this, I can't take a product where there aren't at least intro docs for it and try to figure it all out by myself :( The only thing i could find is a video presentation that I will be taking a look at this weekend. Maybe it will serve as a good intro doc. For now I am trying to make it work using Python scripts + ZSQL methods manually. Would alchemist really simplify the coding? (/me has no idea) Thanks for the reply! -- Paul Eipper Brasil 2007/1/19, Dennis Schulz [EMAIL PROTECTED]: Hi, if you want to do things like this, you also could use the alchmist product. However, I think the archetype / plone formgen integration at the moment is not functional. (ask kapil t. and roché c. for closer info) You would have to start out with plain zope 3 schema and formlib like in the alchemist included orgpeople example. I developed a neat little application that uses the unit of work and automatic transaction support of sql alchemy and all dependent tables are deleted, updated and inserted automatically by the mapper (www.*sqlalchemy*.org/) Dennis ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
[Zope] store dict in session
According to the zope book it should be possible to store dicts in session. When I try to assign a dictionary to a ordinary zope 2 session, with lists there is no problem. why?: requestlist = {} for i in self.request.form: key = i value = self.request.form[i] requestlist[i] = self.request.form[i] sess = self.context.REQUEST.SESSION sess['pr_reqlist'] = requestlist I get the following error: Traceback (innermost last): * Module ZPublisher.Publish, line 196, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish * Module ZPublisher.Publish, line 146, in publish * Module Zope2.App.startup, line 222, in zpublisher_exception_hook * Module ZPublisher.Publish, line 121, in publish * Module Zope2.App.startup, line 240, in commit * Module transaction._manager, line 96, in commit * Module transaction._transaction, line 380, in commit * Module transaction._transaction, line 378, in commit * Module transaction._transaction, line 433, in _commitResources * Module ZODB.Connection, line 484, in commit * Module ZODB.Connection, line 526, in _commit * Module ZODB.Connection, line 553, in _store_objects * Module ZODB.serialize, line 407, in serialize * Module ZODB.serialize, line 416, in _dump * Module copy_reg, line 69, in _reduce_ex TypeError: can't pickle instancemethod objects (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: An operation previously failed, with traceback: File quot;C:\Python\Zope\Zope\lib\python\ZServer\PubCore\ZServerPublisher.pyquot;, line 23, in __init__ response=response) File quot;C:\Python\Zope\Zope\lib\python\ZPublisher\Publish.pyquot;, line 395, in publish_module environ, debug, request, response) File quot;C:\Python\Zope\Zope\lib\python\ZPublisher\Publish.pyquot;, line 196, in publish_module_standard response = publish(request, module_name, after_list, debug=debug) File quot;C:\Python\Zope\Instance\Products\PlacelessTranslationService\PatchStringIO.pyquot;, line 34, in new_publish x = Publish.old_publish(request, module_name, after_list, debug) File quot;C:\Python\Zope\Zope\lib\python\ZPublisher\Publish.pyquot;, line 121, in publish transactions_manager.commit() File quot;C:\Python\Zope\Zope\lib\python\Zope2\App\startup.pyquot;, line 240, in commit transaction.commit() File quot;C:\Python\Zope\Zope\lib\python\transaction\_manager.pyquot;, line 96, in commit return self.get().commit(sub, deprecation_wng=False) File quot;C:\Python\Zope\Zope\lib\python\transaction\_transaction.pyquot;, line 380, in commit self._saveCommitishError() # This raises! File quot;C:\Python\Zope\Zope\lib\python\transaction\_transaction.pyquot;, line 378, in commit self._commitResources() File quot;C:\Python\Zope\Zope\lib\python\transaction\_transaction.pyquot;, line 433, in _commitResources rm.commit(self) File quot;C:\Python\Zope\Zope\lib\python\ZODB\Connection.pyquot;, line 484, in commit self._commit(transaction) File quot;C:\Python\Zope\Zope\lib\python\ZODB\Connection.pyquot;, line 526, in _commit self._store_objects(ObjectWriter(obj), transaction) File quot;C:\Python\Zope\Zope\lib\python\ZODB\Connection.pyquot;, line 553, in _store_objects p = writer.serialize(obj) # This calls __getstate__ of obj File quot;C:\Python\Zope\Zope\lib\python\ZODB\serialize.pyquot;, line 407, in serialize return self._dump(meta, obj.__getstate__()) File quot;C:\Python\Zope\Zope\lib\python\ZODB\serialize.pyquot;, line 416, in _dump self._p.dump(state) File quot;C:\Python\Zope\Python\lib\copy_reg.pyquot;, line 69, in _reduce_ex raise TypeError, quot;can't pickle %s objectsquot; % base.__name__ TypeError: can't pickle instancemethod objects ) ___ 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
Hi I want to acquire an persistent zope object (supplier) that is inside my productfolder myproductfolder/supplier How to get a reference to this object? Also, Is there a method to get the product root? I would like to have that all instances of my class can be traversed like prinstance/suppliers The class has to be derived from SimpleItem. What do I have to add to get it work? class PurchaseRequisition( SimpleItem, Implicit ): suppliers = aq_inner(self).aq_acquire(reference_to_container) Dennis ___ 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
I found no example how to define it in the class generally for all instances i would like to access the supplier container under a different name inside one instance of Purchase Requisition. class PurchaseRequisition( SimpleItem, Implicit ): suppliers = property ( lambda self: str( self.context.aq_inner.aq_parent.supplier) ) Andreas Jung escribió: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 13. Dezember 2006 19:12:13 +0100 Dennis Schulz [EMAIL PROTECTED] wrote: Hi I want to acquire an persistent zope object (supplier) that is inside my productfolder myproductfolder/supplier How to get a reference to this object? Also, Is there a method to get the product root? context.myproductfolder.supplier? That's basic acquisition and should be documented in the Zope Book: http://www.plope.com/Books/2_7Edition/Acquisition.stx - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFgEOjCJIWIbr9KYwRAs/LAJ9ROWS1ArpGH/Mf5+7CesUjXRdGTwCg6U66 BUalSLllgOaxmn4C0kBiCns= =E1/0 -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] tal loop to render table
I would like to build a tal loop that renders a list of elements (widgets in my case) in a table. (for example I have a list of 9 items, then it renders a table: five rows with 2,2,2,2,1 items) the table has 2 columns, so i would need to open and close the table row every second item. I tried to check with a condition if the row is odd or even, but unopened and unclosed tags are not valid. Is there any possibiliy to do this with tal? Dennis ___ 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
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: [Zope] a LocalFS that works
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: Re: [Zope] a LocalFS that works
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] TinyTablesPlus How To??
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
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-dev] Help! Need to extract files out of Data.fs!
Kris, I assume you have a backup of the Data.fs. If you do, nothing is really lost. Have you compressed the Data.fs? There is an option in the control panel to do this. I can be run on a live machine, but you may not want to do so given the size of stuff. I'd do it on a quiet machine. This will remove any cruft you have in the Data.fs and will improve your speed of access somewhat, Things are probably slow because of swapping. Reducing the size of Data.fs may speed things up. Take a look at the documentation for the ZODB (Google is your friend). You could write a program in Python to simply open the ZODB and extract the files you need. It might save a bit of overhead. Remember 1.3TB is a large file and is going to take some time to process no matter what. On Mon, 28 Aug 2006, Kris Adcock wrote: Hiya, My company has been using a Zope server to store some reference material, but it has grown beyond belief, and I need to extract all the collected files (about 1.3 terabytes!) from the Data.fs into distinct files onto a different server. Unfortunately, I've run into some problems. Firstly, the FTP transfer process seems to be extremely slow, and if I try and transfer too large or deep a folder structure in one go then things grind to a halt. To beat this I've been carefully recreating the folder structure manually, and copying things in easier-to-digest chunks. Unfortunately, because I was a bit rushed over the weekend I have accidentally deleted about 130,000 files! I've tried going through the Undo procedure, but the idea of manually ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread. So ... Please please /please/ does anyone happen to have the file format for the Data.fs file so that I could write a C program to extract and recreate the files and folders to another server? Or has anyone written such a program already? If so, I'll happily have your children if you can help me out! As it stands, I'm going to have to break it to the librarian (the poor man who has been collating all the reference material for the last six months) that I've lost half of his work, and blaming it on the poor FTP client in Windows seems a bit lame! If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access to the Linux box ... and a large hammer, if I need it! :( Help! Many thanks in advance, Kris (considering giving up this computing job and going to live in a cave somewhere). ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) -- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help! Need to extract files out of Data.fs!
One more thing, what does the disk where the Data.fs resides look like? On Mon, 28 Aug 2006, Dennis Allison wrote: Kris, I assume you have a backup of the Data.fs. If you do, nothing is really lost. Have you compressed the Data.fs? There is an option in the control panel to do this. I can be run on a live machine, but you may not want to do so given the size of stuff. I'd do it on a quiet machine. This will remove any cruft you have in the Data.fs and will improve your speed of access somewhat, Things are probably slow because of swapping. Reducing the size of Data.fs may speed things up. Take a look at the documentation for the ZODB (Google is your friend). You could write a program in Python to simply open the ZODB and extract the files you need. It might save a bit of overhead. Remember 1.3TB is a large file and is going to take some time to process no matter what. On Mon, 28 Aug 2006, Kris Adcock wrote: Hiya, My company has been using a Zope server to store some reference material, but it has grown beyond belief, and I need to extract all the collected files (about 1.3 terabytes!) from the Data.fs into distinct files onto a different server. Unfortunately, I've run into some problems. Firstly, the FTP transfer process seems to be extremely slow, and if I try and transfer too large or deep a folder structure in one go then things grind to a halt. To beat this I've been carefully recreating the folder structure manually, and copying things in easier-to-digest chunks. Unfortunately, because I was a bit rushed over the weekend I have accidentally deleted about 130,000 files! I've tried going through the Undo procedure, but the idea of manually ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread. So ... Please please /please/ does anyone happen to have the file format for the Data.fs file so that I could write a C program to extract and recreate the files and folders to another server? Or has anyone written such a program already? If so, I'll happily have your children if you can help me out! As it stands, I'm going to have to break it to the librarian (the poor man who has been collating all the reference material for the last six months) that I've lost half of his work, and blaming it on the poor FTP client in Windows seems a bit lame! If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access to the Linux box ... and a large hammer, if I need it! :( Help! Many thanks in advance, Kris (considering giving up this computing job and going to live in a cave somewhere). ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) -- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] How best to copy and paste in pythonscript?
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] How best to copy and paste in pythonscript?
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?
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] Trouble with PIL and Zope 2.8
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!
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: POUND/VHM AND ZOPE HELL!!! was: Re: [Zope] Can't Find This Bug!
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
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 eventlog level INFO logfile path $INSTANCE/log/event.log level info /logfile /eventlog logger access level WARN logfile path $INSTANCE/log/Z2.log format %(message)s /logfile /logger http-server # valid keys are address and force-connection-close address 8080 # force-connection-close on /http-server ftp-server # valid key is address address 8021 /ftp-server zodb_db main # Main FileStorage database filestorage path $INSTANCE/var/Data.fs /filestorage mount-point / /zodb_db zodb_db temporary # Temporary storage database (for sessions) temporarystorage name temporary storage for sessioning /temporarystorage mount-point /temp_folder container-class Products.TemporaryFolder.TemporaryContainer /zodb_db 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: [Zope] Log Files Not Logging
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] MySQL queries in Python
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 = dtml-var REQUEST.SESSION.get('person_id') I know the MySQL query works, but I get garbage results from the python script (Shared.DC.ZRDB.Results.Results instance at 0x132a5c88). 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
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] Trying to trap ConflictError
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: zope@zope.org 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
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: zope@zope.org 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] ConflictError with *one* ZEO client?
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
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: dtml-var methodB 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 dtml-call 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
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
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 dtml-tree 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 dtml-tree 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
Chris, Andreas, others LocalFS product (1.3-andreas) seems to be having a problem with the dtml-tree tag in Zope 2.9.2/Python 2.4.2. The dtml-tree 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 dtml-tree 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
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 PythonScript at /draPlay/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
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
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 )
[Zope] External Methods
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 )
Re: [Zope] External Methods
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 )
Re: [Zope] External Methods
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: XML export/import is cool! (Was Re: [Zope-dev] Deprecating XML export/import?)
On Fri, 24 Mar 2006, Jim Fulton wrote: Andreas Jung wrote: I propose to deprecate XML export/import for Zope 2.10 and to remove it in Zope 2.12. We don't loose any functionality since .zexp is working fine. I don't know of any active projects/code that really uses XML export/import. Comments? I filed a bug report (2051: xml import export fail) which was triggered by the need to move material from a recent zope (2.9) to an older zope (2.7.4) where the zexp format was incompatible. Eventually, I was able to make the XML work. ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] Re: Stepper on Zope 2.9.X
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] Stepper on Zope 2.9.X
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 )
[Zope] Zasync
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] Using Twisted rather than ZServer with Zope = 2.9.0
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] Using Twisted rather than ZServer with Zope = 2.9.0
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 )
Re: [Zope] No module named rotor
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 smile. Or you can add back in the rotormodule as a Python Extension. The rotormodule can be picked up for the Module directory of the Python 1.5 directory. On Tue, 14 Mar 2006, Jeff Gentry wrote: 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=detailitemitem_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] No module named rotor
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] AttributeError on SESSION
Are cookies enabled? If not, should be. what does request look like dtml-var REQUEST 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
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
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 )
[Zope] Re: Squishdot installation problems, CVS problems
so many lists, so little time g 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 )
Re: [Zope] readconflicterror
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
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 @@ EMSTRONGMailnbsp;Hostnbsp;nbsp;/STRONG/EM /TD TD ALIGN=LEFT VALIGN=TOP -dtml-if mailhost_list +dtml-if expr=superValues('Mail Host') SELECT NAME=mailhost OPTION VALUE= SELECTEDnbsp; - dtml-in mailhost_list + dtml-in expr=superValues('Mail Host') OPTION VALUE=dtml-var id html_quotedtml-var title_or_id - /dtml-in mailhost_list + /dtml-in /SELECT dtml-else INo Mail Host objects could be found./IBR @@ -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. /small -/dtml-if mailhost_list +/dtml-if /TD /TR TR @@ -71,7 +71,7 @@ This site is STRONGnot moderated/STRONG /TD /TR -dtml-if mailhost_list +dtml-if expr=superValues('Mail Host') TR TD/TD TD ALIGN=LEFT VALIGN=TOP @@ -82,7 +82,7 @@ Mail new replies to the admin address. /TD /TR -/dtml-if mailhost_list +/dtml-if TR TD/TD TD ALIGN=LEFT VALIGN=TOP 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] Squishdot on Zope 2.9.X with Python 2.4.2
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 )
Re: [Zope] Squishdot on Zope 2.9.X with Python 2.4
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] External Methods newbie question
To executed a whole file you need to wrap it as a function -- def foo( self ): the script 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] Dates off by one day
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 )
[Zope] Squishdot on Zope 2.9.X with Python 2.4.2
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] Startup error with Formulator
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: configure xmlns=http://namespaces.zope.org/zope; xmlns:i18n=http://namespaces.zope.org/i18n; !-- i18n -- i18n:registerTranslations directory=i18n / /configure 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] Startup error with Formulator
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: configure xmlns=http://namespaces.zope.org/zope; xmlns:i18n=http://namespaces.zope.org/i18n; !-- i18n -- i18n:registerTranslations directory=i18n / /configure -- ___ 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
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] Trademarks, Zope and Zoep
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 )
[Zope] Re: New Product called Zoep
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 allison-IUYf/[EMAIL PROTECTED] 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] Zope=ZEO connection
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 some path: 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 eventlog level ALL logfile path $INSTANCE/log/event.log level info /logfile /eventlog 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 )
Re: [Zope] Zope=ZEO connection
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 some path: 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 eventlog level ALL logfile 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] ZEO disconnects, Zope auto restarts (via zopectl)
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: zope.conf # ZEO client storage: # zodb_db main mount-point / # ZODB cache, in number of objects cache-size 5000 zeoclient 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 /zeoclient /zodb_db zeo.conf zeo address localhost:8301 read-only false invalidation-queue-size 100 pid-filename $INSTANCE/var/ZEO.pid # monitor-address PORT # transaction-timeout SECONDS /zeo runner 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 /runner 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] ZEO disconnects, Zope auto restarts (via zopectl)
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] raw trace log format
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] Re: raw trace log format
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 Designhttp://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-dev] ZSyncer
Paul, Just moved all our systems to ZSyncer 0.7.0 and have encountered a problem related to authentication. In our past setup, using ZSyncer 0.5.1, we use the ability to specify a user:password to provide a single authorization mechanism that could be used by all of our developers. Now we've stumbled onto the fact that ZSyncer 0.7.0 has eliminated the optin al user:password specification. Some of our users can use ZSyncer and others cannot. It's not clear what authorization is being used -- I suspect it is ownership, but I have not investigated. So, how do I configure things to allow a subset of my developers to use ZSyncer transparently? ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZSyncer
Yes, it is bad form to answer ones own questions, but ... I had not read the documentation carefully. The answer is that the specifications for targets is user:[EMAIL PROTECTED]:port/path-to-ZSyncer-instance and is as elegant as it gets. It uses Basic Authentication and is documented in the README I neglected to read as this is the fifth version of ZSyncer I've installed and I thought I knew the product. On Wed, 1 Feb 2006, Dennis Allison wrote: Paul, Just moved all our systems to ZSyncer 0.7.0 and have encountered a problem related to authentication. In our past setup, using ZSyncer 0.5.1, we use the ability to specify a user:password to provide a single authorization mechanism that could be used by all of our developers. Now we've stumbled onto the fact that ZSyncer 0.7.0 has eliminated the optin al user:password specification. Some of our users can use ZSyncer and others cannot. It's not clear what authorization is being used -- I suspect it is ownership, but I have not investigated. So, how do I configure things to allow a subset of my developers to use ZSyncer transparently? ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) -- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Off Topic: Good linux editors?
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)
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] LocalFS under Zope2.9
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 )
[Zope] Zope 2.9 and product installation
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 )
Re: [Zope] Autoconnect with ZMySQLDA 2.0.9
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
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
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
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
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
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? ;-) Not really off the hook as issues still remain and you are a valuable resource. :-) I need to spend some time thinking about the issues an do some cautious experimentation and testing. ___ 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
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
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
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 )
Re: [Zope] More on understanding conflicts
One more thought --- On Wed, 21 Dec 2005, Chris McDonough wrote: The structure of the method is simple enough: there is a large dtml-let block which populates local variables with data from the session variables dtml-let foobar=getSessionVariable('foobar') ... with the body of the dtml-let 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-dev] Re: sessions in the presence of conflicts
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-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Re: [Zope-dev] Re: sessions in the presence of conflicts
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-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )