[Zope] buildout for plone2.5: paster creates bad zcml
Hi there, I try to use paster for a plone 2.5 site. this is what I have done: paster create -t plone2.5_buildout plone2 executed bootstrap and buildout then in src: paster create -t plone2.5_theme x.y which I added to the buildout.cfg like so: [buildout] ... eggs = elementtree x.y develop = src/x.y ... [instance] ... zcml = x.y when I then start the new instance, I get the following error: zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/zope/plone2/parts/instance/etc/site.zcml", line 11.2-11.55 ZopeXMLConfigurationError: File "/home/zope/plone2/parts/instance/etc/package-includes/001-x.y-configure.zcml", line 1.0-1.47 ZopeXMLConfigurationError: File "/home/zope/plone2/src/x.y/x/y/configure.zcml", line 8.2 ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/five', u'registerPackage') what can I do to fix this? thanks robert ___ 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] buildout for plone2.5: paster creates bad zcml
for the record: I found a way to fix this by using a newer five versin. I added: urls = http://codespeak.net/z3/five/release/Five-1.4.4.tgz in the buildout.cfg. it would be much nicer, to have the buildout recipes fixed robert robert rottermann schrieb: Hi there, I try to use paster for a plone 2.5 site. this is what I have done: paster create -t plone2.5_buildout plone2 executed bootstrap and buildout then in src: paster create -t plone2.5_theme x.y which I added to the buildout.cfg like so: [buildout] ... eggs = elementtree x.y develop = src/x.y ... [instance] ... zcml = x.y when I then start the new instance, I get the following error: zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/zope/plone2/parts/instance/etc/site.zcml", line 11.2-11.55 ZopeXMLConfigurationError: File "/home/zope/plone2/parts/instance/etc/package-includes/001-x.y-configure.zcml", line 1.0-1.47 ZopeXMLConfigurationError: File "/home/zope/plone2/src/x.y/x/y/configure.zcml", line 8.2 ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/five', u'registerPackage') what can I do to fix this? thanks robert ___ 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] Saving PIL Images on zope
I am using Plone3 and zope 2.10, I need to save PIL images generated through MatplotLib Graphs using External Methods to my zope site I have used addImage(self,'%s' % img_id, title = '%s' % img_id, file=image_data.getvalue() ) which adds image as a content type and also on the current context Is there any other way to save images on my local zope site? ___ 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] saving PIL Images
--On 28. Mai 2008 15:01:56 +0530 Gaurav Girotra <[EMAIL PROTECTED]> wrote: Can anyone Help me in saving images to the file system. Pretty easy: fix your file permissions. If your zope process should write to the filesystem then the directory must be writable. -aj pgpMbn5l12xbZ.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] saving PIL Images
2008/5/28 Gaurav Girotra <[EMAIL PROTECTED]>: > Hello > > I am using Plone3 and zope 2.10, > I need to save images generated through MatplotLib Graphs using External > Methods to my zope site or to my linux file system. > > When i try to save using im.save("/zope/zeocluster/Extemsions") Been a while but doesn't im.save() expect a filename? > folder i get Permission denied error. > > Can anyone Help me in saving images to the file system. > > ___ > 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 ) > > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] saving PIL Images
Hello I am using Plone3 and zope 2.10, I need to save images generated through MatplotLib Graphs using External Methods to my zope site or to my linux file system. When i try to save using im.save("/zope/zeocluster/Extemsions") folder i get Permission denied error. Can anyone Help me in saving images to the file system. ___ 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] Multithreading sessions
Jens, Thanks for your input. Unfortunately, I am out of the office this week. When I return I will be trying to resolve this issue. I don't believe it has squat to do with my Database at all, so I will be setting up some scenarios where I am making simultaneous requests, requiring no DB access. I will echo the data to my screen, hopefully I will see an interwoven jumble of characters as my web server is sending text "simultaneously" to multiple clients. If I don't see an interwoven jumble of stuff representing the various threads, then my problem is more fundamental than DB contention. I appreciate everyone's help. Jon Emmons On Fri, May 23, 2008 at 1:55 PM, Andreas Jung <[EMAIL PROTECTED]> wrote: > > > --On 23. Mai 2008 12:31:50 -0500 Jens Vagelpohl <[EMAIL PROTECTED]> > wrote: > > >> On May 23, 2008, at 11:49 , Jon Emmons wrote: >> >>> Another thought I had, is that Zope has only one python interpreter >>> running, >>> pretty much forcing all processing to be serial by default given >>> what you've >>> just said. >>> >> >> Sorry, that's all baloney. Just like blindly hiking the number of threads >> or the ZODB database connection pool size. Zope can handle more than one >> concurrent request. >> >> I would take a close look at the Zope database adapter for your >> relational database you are using. Some are not thread-enabled and will >> serialize database access. >> > > Not much to be added. Either your backend server blocks further requests > (as indicated earlier by a database lock) or some extension module is > holding the GIL. We have seen situation where Python did not perform a > thread switch while working on a complex regular expression operation in one > thread (preventing a thread switch over ten seconds and longer). > > 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 ) > > ___ 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] Multithreading sessions
Jon Emmons wrote at 2008-5-23 08:58 -0400: > ... >I am running zope 2.9.4 and have observed that it will not simultaneously >serve pages to my users. Usually, it does. I have seen database adapter packages (an old "psycopg" version, to be precise) that forgot to release the GIL for some operations. Then Zope freezes while these operations are executed. A surprising report of a similar kind was: while Zope's embedded profiler is in use, Zope effectively runs in single thread mode (such that other threads do not distort the timing results). Probably not your problem ... but who knows. Further potential reasons (for almost surely not responsible for your current problem: Expensive operations implemented in "C" (such as operations on huge strings) Creating excessive amounts of objects (causing lots of generation 2 garbage collections which hold the GIL) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PageTemplates len() of unsized object
Giampiero Benvenuti wrote at 2008-5-24 11:47 +0200: > ... >after the upgrade from zope2.9.7 to 2.10.6 i get this error in the >event log: > >2008-05-24T09:31:32 ERROR Zope.SiteErrorLog http://myurl/error_log/manage_main >Traceback (innermost last): > Module ZPublisher.Publish, line 119, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 42, in call_object > Module Shared.DC.Scripts.Bindings, line 313, in __call__ > Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec > Module Products.PageTemplates.PageTemplateFile, line 129, in _exec > Module Products.PageTemplates.PageTemplate, line 89, in pt_render > Module zope.pagetemplate.pagetemplate, line 117, in pt_render > Module zope.tal.talinterpreter, line 271, in __call__ > Module zope.tal.talinterpreter, line 346, in interpret > Module zope.tal.talinterpreter, line 379, in do_startEndTag > Module zope.tal.talinterpreter, line 412, in do_startTag >TypeError: len() of unsized object Looks as if the Zope 2.10 PageTemplate implementation made a big step backward with respect to quality of traceback information :-(( Shane had added lots of "__traceback_info__" and "__traceback_supplement__" declarations to the older code such that the tracebacks were very informative ... unlike the traceback above. Looking at the code of "do_startTag", I see that the problem is with an attribute definition in a start tag. Such an attribute definition should be evaluated into a sequence of strings (or unicode strings). The error happens because one of these sequence elements is not a string, more precisely, it is something "len(...)" cannot be applied to. Unfortunately, we would need to know the affected template, the template line this problems occurs in (and its code) and the attribute causing this problem. It would be Zope's task to provide this information -- but as I have said: it apparently made big steps backward with Zope 2.10 You could try to add __traceback_info__ = name, item, rendered, s before line 412 of "zope/tal/talinterpreter.py". The traceback would then tell us: the name of the tag ("name"), the attribute definition ("item"), its evaluation ("rendered") and the problematic element. We still would not know which PageTemplate causes the problem (but we might guess this). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PageTemplates len() of unsized object
Thanks Dieter, I was able to "solve" the problem by uninstalling all the products. By trial and error I found out the problem was caused by the Placeless Translation Service product. Maybe there was some dependency from something else; I can't tell. I just got rid of it and now everything works as normal. Thanks anyhow, Giampiero On May 28, 2008, at 8:48 PM, Dieter Maurer wrote: Giampiero Benvenuti wrote at 2008-5-24 11:47 +0200: ... after the upgrade from zope2.9.7 to 2.10.6 i get this error in the event log: 2008-05-24T09:31:32 ERROR Zope.SiteErrorLog http://myurl/error_log/manage_main Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.PageTemplateFile, line 129, in _exec Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 379, in do_startEndTag Module zope.tal.talinterpreter, line 412, in do_startTag TypeError: len() of unsized object Looks as if the Zope 2.10 PageTemplate implementation made a big step backward with respect to quality of traceback information :-(( Shane had added lots of "__traceback_info__" and "__traceback_supplement__" declarations to the older code such that the tracebacks were very informative ... unlike the traceback above. Looking at the code of "do_startTag", I see that the problem is with an attribute definition in a start tag. Such an attribute definition should be evaluated into a sequence of strings (or unicode strings). The error happens because one of these sequence elements is not a string, more precisely, it is something "len(...)" cannot be applied to. Unfortunately, we would need to know the affected template, the template line this problems occurs in (and its code) and the attribute causing this problem. It would be Zope's task to provide this information -- but as I have said: it apparently made big steps backward with Zope 2.10 You could try to add __traceback_info__ = name, item, rendered, s before line 412 of "zope/tal/talinterpreter.py". The traceback would then tell us: the name of the tag ("name"), the attribute definition ("item"), its evaluation ("rendered") and the problematic element. We still would not know which PageTemplate causes the problem (but we might guess this). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: PageTemplates len() of unsized object
Dieter Maurer wrote: Giampiero Benvenuti wrote at 2008-5-24 11:47 +0200: ... after the upgrade from zope2.9.7 to 2.10.6 i get this error in the event log: 2008-05-24T09:31:32 ERROR Zope.SiteErrorLog http://myurl/error_log/manage_main Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.PageTemplateFile, line 129, in _exec Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 379, in do_startEndTag Module zope.tal.talinterpreter, line 412, in do_startTag TypeError: len() of unsized object Looks as if the Zope 2.10 PageTemplate implementation made a big step backward with respect to quality of traceback information :-(( As far as I can see, traceback information was never added within the TAL interpreter but always for TALES expression evalutation. The traceback above seems to be about something going wrong within the TAL interpreter which is probably why we don't see any further traceback info. Shane had added lots of "__traceback_info__" and "__traceback_supplement__" declarations to the older code such that the tracebacks were very informative ... unlike the traceback above. As far as I can tell, the code in zope.pagetemplate and zope.tales still has the same traceback information that Products.PageTemplate had. zope.tal, which contains the TAL interpreter, doesn't have any traceback supplements, but then again, Zope 2's TAL package doesn't either. To conclude, I don't think there's a "step backward" at all. ___ 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 )