RE: [Zope] developing with zmi: how to move a patch from data fro m devel to live?
You can manually export objects from your dev zope to individual files and then import them back to the live instance through ZMI. You could try this : http://zsyncer.sourceforge.net/ It will enable you, for built-in Zope object types (but then you can extend it with your own types) to list the differences between your dev and live zope instances and deploy your changes. Pascal -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de gabor Envoyé : lundi 20 juin 2005 08:35 À : zope@zope.org Objet : [Zope] developing with zmi: how to move a patch from data from devel to live? hi, my problem is the following... imagine that you develop something for the customer using zope. while developing you use the ZMI a lot... to set some settings, to create python scripts and so on. you do this on the 'devel' server. then you deliver the solution to the customer (to the 'live' server). you can simply copy the data.fs stuff to the live server. after some time the either customer wants some new features, or there's a bug to fix or something like that. now you create the fix/improvement on the devel server. but now how do you move the improvement/fix to the live server? you cannot just copy the data.fs over. the customer already has some content/data in it... one way seems to be to not use the ZMI at all. you create an install python script, which calls the methods of the ZMI interface. this way works, but it seems for me to waste my time. finding the right method that the gui calls to call it from the install script seems stupid for me. but it solves the problem. with the script i can really make the changes i need on the devel server. so, is there a solution where i can use the ZMI? how do you solve this kind of problem? gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] automagic reindexing of objects
[ Dieter Maurer wrote:] > Jürgen Herrmann wrote at 2005-6-17 14:19 +0200: >>i make heavy use of indexes in my extension classes. these all inherit >>from catalogpathaware, so i have to call object.reindex_object() on >>each changed instance. calling it from attribute getters/setters f.ex. >>is not a good idea, because changing 3 attributes will reindex the object >>3 times. >> >>what i'd like to have is that such objects are reindexed automatically >>before comitting a transaction. >> >>is it possible? where should i start looking in the source, is there >>possibly a before_transaction_commit hook? > > It is impossible with "ZODB 3.2" (unless you patch > "ZODB.Transaction.Transaction"). > > "ZODB 3.4" (which is used for Zope 2.8/3.1) has hooks > that makes it possible. > > -- > Dieter that's what i wanted to hear, thanks! i'll have a look at zope 2.8 immediately :) regards, juergen herrmann ___ >> XLhost.de - eXperts in Linux hosting << Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] developing with zmi: how to move a patch from data from devel to live?
On 20 Jun 2005, at 07:35, gabor wrote: now you create the fix/improvement on the devel server. but now how do you move the improvement/fix to the live server? you cannot just copy the data.fs over. the customer already has some content/data in it... one way seems to be to not use the ZMI at all. you create an install python script, which calls the methods of the ZMI interface. this way works, but it seems for me to waste my time. finding the right method that the gui calls to call it from the install script seems stupid for me. but it solves the problem. with the script i can really make the changes i need on the devel server. so, is there a solution where i can use the ZMI? how do you solve this kind of problem? The problem is that you develop using the ZMI. It's a bad pattern. Don't do 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 )
Re: [Zope] developing with zmi: how to move a patch from data from devel to live?
Jens Vagelpohl wrote: On 20 Jun 2005, at 07:35, gabor wrote: now you create the fix/improvement on the devel server. but now how do you move the improvement/fix to the live server? you cannot just copy the data.fs over. the customer already has some content/data in it... one way seems to be to not use the ZMI at all. you create an install python script, which calls the methods of the ZMI interface. this way works, but it seems for me to waste my time. finding the right method that the gui calls to call it from the install script seems stupid for me. but it solves the problem. with the script i can really make the changes i need on the devel server. so, is there a solution where i can use the ZMI? how do you solve this kind of problem? The problem is that you develop using the ZMI. It's a bad pattern. Don't do it. well, it's the opposite. i (our company) don't develop using the ZMI. i'm using an install script. so when we install our program, no gui editing is needed. but last week i've seen a presentation which used a CMS system called Typo3. and a guy showed us how he can build a CMS only with gui tools. it was very fast and effective. and then i thought.. wow, you can work sooo fast in typo3. and we're so slow to develop with zope (plone/cmf/whatever). and then i remembered. but wait, we don't use the gui tools (zmi) at all! maybe we should! an example: for the next version of the program, we decided to change an action what happens when you click on a TAB in the CMS. in gui, i would do it like this: go to the portal_actions object, find the correct tab, change the python-script associated to it. but we had to dig thru the source code, to find out how the ZMI does it, and follow the same process when we did it programmatically in the python install script. it took us let's say 4-5hours (partly because that part of the CMF was badly documented, and used a quite inconvenient way to handle that) compare that: 1minutes in the ZMI or 5hours in a python-script. which one is better? well, or let me ask the question a different way: if i should not use the ZMI, then why is it there? gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] developing with zmi: how to move a patch from data from devel to live?
On 20 Jun 2005, at 10:16, gabor wrote: well, or let me ask the question a different way: if i should not use the ZMI, then why is it there? The ZMI is great for maintenance tasks, but not great for software development. You already ran into the first issue, replicating changes to other machines. Then there is no way to apply sane software development techniques, like using version control software and developing in a team. 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 )
Re: [Zope] Passing parameters using DTML
On Fri, Jun 17, 2005 at 05:39:23PM -0500, J Cameron Cooper wrote: > >>I'm assuming the above line comes from a page template. > >>You neglected to mention what the calling DTML looks like, > >>but I *guess* that it was something like this: > >> > >>yes? no? > > > > > > This is what I have:- > > > > > > > > I wish to get 'myobjectname' into this line in 'testlist' which is marked > > with * > > > > python:here.parse_file(file=context.**,sepr=',',clone=1)"> > > > > There must be a simple way of doing this, but I haven't come across an > > example of it and I've spent most of the day on it. > > Taking the options from my previous email and putting them together, you > can say:: > > python:here.parse_file(file=getattr(context,options.parm),...) > > to get the attribute on the current context named 'myobjectname' or > whatever else you provide as the 'parm' parameter on 'testlist'. Many thanks. I appreciate the help. I think I've incorporated your suggestion into the code below... Unfortunately, when I try to use this expression I get this Zope error:- Error Type: AttributeError Error Value: 'dict' object has no attribute 'parm' Can't help thinking it is a simple syntax error - missing bracker, quote etc... but just can't figure it out. > --jcc > > -- > "Building Websites with Plone" > http://plonebook.packtpub.com/ > > Enfold Systems, LLC > http://www.enfoldsystems.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] Graphical front end for Zope?
On 6/20/05, John Poltorak <[EMAIL PROTECTED]> wrote: > I don't suppose there is such a thing as a graphical front end for > building Zope sites... > > I've just been trying out a Flash based product called SiteMaker > > http://www.moonfruit.com/ > > which made designing web pages a doddle. Just wish there was something > which would simplify the building of a Zope site. Well, later version of CPS contains CPSSkins, which allows you to design your site graphically, and CPSTypeMaker, which allows you to create new types easily. Maybe that's something similar? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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 is the appendix in the online book
i was searching for the same thing today, and i found it at: http://plone-book.agmweb.ca/ you have to chexk out each chapters errata, from there you have links to each chapters relavant scripts and links. a little tricky, huh ? hope to have been of some help, michi ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] ZODB error when trying to index object (Input/output error)
Hi I get the following error when certain new objects are added into a plone site - when archetypes tries to set the UID, it asks the catalog for all unique values of the index "UID". I;ve never had input/output errors before from the ZODB. There's definitely enough space on the drive and objects are added fine - it's just that the UID is then not set, which breaks all sorts of Archetypes stuff. Any ideas how I can hunt this one down? Thanks, Felix. 2005-06-20T13:15:26 ERROR(200) ZODB Couldn't load state for 0x111310 Traceback (most recent call last): File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 662, in _load h = read(DATA_HDR_LEN) IOError: [Errno 5] Input/output error -- 2005-06-20T13:15:26 ERROR(200) Archetypes None Traceback (most recent call last): File "/zope/global-products/Archetypes/Referenceable.py", line 69, in _register cid = archetype_tool.registerContent(self) File "/zope/global-products/Archetypes/ArchetypeTool.py", line 681, in registerContent cid = self._genId(object) File "/zope/global-products/Archetypes/ArchetypeTool.py", line 659, in _genId keys = catalog.uniqueValuesFor('UID') File "/usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py", line 562, in uniqueValuesFor return self._catalog.uniqueValuesFor(name) File "/usr/local/zope/lib/python/Products/ZCatalog/Catalog.py", line 425, in uniqueValuesFor return self.getIndex(name).uniqueValues() File "/usr/local/zope/lib/python/Products/PluginIndexes/common/UnIndex.py", line 445, in uniqueValues return tuple(self._index.keys()) File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 662, in _load h = read(DATA_HDR_LEN) IOError: [Errno 5] Input/output error ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] developing with zmi: how to move a patch from data fro m devel to live?
On Mon, Jun 20, 2005 at 09:13:57AM +0200, Pascal Peregrina wrote: > You can manually export objects from your dev zope to individual files and > then import them back to the live instance through ZMI. > > You could try this : http://zsyncer.sourceforge.net/ > It will enable you, for built-in Zope object types (but then you can extend > it with your own types) to list the differences between your dev and live > zope instances and deploy your changes. ... in a limited fashion, yes. However, it doesn't tell you anything about valuable metadata such as properties, security settings, etc. And if you sync a folderish object, zsyncer will necessarily sync all its sub-objects as well. But within those limitations, it's still pretty useful. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] custom_persist_obj
Hi, I am new to Zope and not a programmer. It is a little bit complex for me. I am very frustrated, as I can not find the solution for a pretty simple task: I would like to have persistent object with dictionaries. I think I do not need a ZClass or Product, just a simple object for holding mutable and persistent dictionaries (Manipulating with Script). Like MyObject: dict1 = [ a:1, b:1, c:1, ...] dict2 = [ a:2, d:4, e:6] etc. Thanks for your help in advance, Tamas ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] custom_persist_obj
On Mon, Jun 20, 2005 at 05:12:29AM -0400, Tamas Hegedus wrote: > Hi, > > I am new to Zope and not a programmer. It is a little bit complex for > me. I am very frustrated, as I can not find the solution for a pretty > simple task: > > I would like to have persistent object with dictionaries. > I think I do not need a ZClass or Product, just a simple object for > holding mutable and persistent dictionaries (Manipulating with Script). > Like > MyObject: > dict1 = [ a:1, b:1, c:1, ...] > dict2 = [ a:2, d:4, e:6] > etc. > > Thanks for your help in advance, > Tamas If you want a custom persistent object, you do indeed need to write a Product. But that needn't be complex. http://www.zope.org/Members/maxm/HowTo/minimal_01 -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] custom_persist_obj
You have a built-in Zope object for this : PersistentMapping. dict1=PersistentMapping({'a':1,'b':1,'c':1, ...}) dict1=PersistentMapping({'a':2,'d':4,'e':6}) The only thing you can not do compared to dictionaries is : for key in dict1: do something (you need to use for key in dict1.keys():...) Pascal -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Tamas Hegedus Envoyé : lundi 20 juin 2005 11:12 À : zope@zope.org Objet : [Zope] custom_persist_obj Hi, I am new to Zope and not a programmer. It is a little bit complex for me. I am very frustrated, as I can not find the solution for a pretty simple task: I would like to have persistent object with dictionaries. I think I do not need a ZClass or Product, just a simple object for holding mutable and persistent dictionaries (Manipulating with Script). Like MyObject: dict1 = [ a:1, b:1, c:1, ...] dict2 = [ a:2, d:4, e:6] etc. Thanks for your help in advance, Tamas ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] custom_persist_obj
Thanks! I am going to try the simpler one first. But I think to be able to create a simple product is also a must. So I will try both. Tamas ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] custom_persist_obj
Well, sure. But you need to write some unrestricted (i.e. filesystem-based) code if you want to create instanced of PersistentMapping and the like. by the way, if it's ever going to get large, you might look into using OOBTree instead of PersistentMapping. See: http://www.zope.org/Wikis/ZODB/guide/node6.html#SECTION00063 -PW On Mon, Jun 20, 2005 at 03:24:12PM +0200, Pascal Peregrina wrote: > You have a built-in Zope object for this : PersistentMapping. > > dict1=PersistentMapping({'a':1,'b':1,'c':1, ...}) > dict1=PersistentMapping({'a':2,'d':4,'e':6}) > > The only thing you can not do compared to dictionaries is : > for key in dict1: > do something > (you need to use for key in dict1.keys():...) > > Pascal > > -Message d'origine- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de > Tamas Hegedus > Envoy? : lundi 20 juin 2005 11:12 > ? : zope@zope.org > Objet : [Zope] custom_persist_obj > > > Hi, > > I am new to Zope and not a programmer. It is a little bit complex for > me. I am very frustrated, as I can not find the solution for a pretty > simple task: > > I would like to have persistent object with dictionaries. > I think I do not need a ZClass or Product, just a simple object for > holding mutable and persistent dictionaries (Manipulating with Script). > Like > MyObject: >dict1 = [ a:1, b:1, c:1, ...] >dict2 = [ a:2, d:4, e:6] >etc. > > Thanks for your help in advance, > Tamas > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > > > ** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > www.mimesweeper.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 ) -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Getting information about current method
Peter Bengtsson <[EMAIL PROTECTED]> wrote: > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > > It's an application instance wrapped in a list; it seems to be > > identical to self, actually - self.REQUEST['URL'] and > > self.REQUEST.PARENTS[0].REQUEST['URL'] are the same. However, the two > > REQUESTs are not the identical object (== returns False). > > > > Then I don't know. > (The application instance is none other than zope itself. ) > I can honestly not think of a way to extract this information. I've > even tried setting up a simple example method and I couldn't get hold > of the zodb name of the external method that is called. You can go the low-level route: Using the inspect module, you can get to the stack frames of your callers, and then inspect the local variables there. There must be one that can get you the information you want. See the docstrings of the functions in the inspect module for details. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] automagic reindexing of objects
Dieter Maurer <[EMAIL PROTECTED]> wrote: > Jürgen Herrmann wrote at 2005-6-17 14:19 +0200: > >i make heavy use of indexes in my extension classes. these all inherit > >from catalogpathaware, so i have to call object.reindex_object() on > >each changed instance. calling it from attribute getters/setters f.ex. > >is not a good idea, because changing 3 attributes will reindex the object > >3 times. > > > >what i'd like to have is that such objects are reindexed automatically > >before comitting a transaction. > > > >is it possible? where should i start looking in the source, is there > >possibly a before_transaction_commit hook? > > It is impossible with "ZODB 3.2" (unless you patch > "ZODB.Transaction.Transaction"). The CPSCompat module of CPS has monkey-patches that backport this from ZODB 3.4, among others, to be used in Zope 2.7. http://svn.nuxeo.org/trac/pub/file/CPSCompat/trunk/PatchZODBTransaction.py Florent > "ZODB 3.4" (which is used for Zope 2.8/3.1) has hooks > that makes it possible. -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Getting information about current method
> > > > Then I don't know. > > (The application instance is none other than zope itself. ) > > I can honestly not think of a way to extract this information. I've > > even tried setting up a simple example method and I couldn't get hold > > of the zodb name of the external method that is called. > > You can go the low-level route: Using the inspect module, you can get to > the stack frames of your callers, and then inspect the local variables > there. There must be one that can get you the information you want. > We tried that but no luck. > See the docstrings of the functions in the inspect module for details. > > Florent > > -- > Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D > +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] > -- 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 )
Re: [Zope] ZODB error when trying to index object (Input/output error)
Felix Ulrich-Oltean wrote: I get the following error when certain new objects are added into a plone site - when archetypes tries to set the UID, it asks the catalog for all unique values of the index "UID". I;ve never had input/output errors before from the ZODB. There's definitely enough space on the drive and objects are added fine - it's just that the UID is then not set, which breaks all sorts of Archetypes stuff. Any ideas how I can hunt this one down? This IOError typically indicates a rights problem at the filesystem level. I could also be a full-disk problem or maybe a file corruption. Check the OS-level stuff first, and then try the usual ZODB check/recover stuff. I don't think this is relevant, but it may be useful: http://mail.python.org/pipermail/python-list/2003-March/151633.html --jcc 2005-06-20T13:15:26 ERROR(200) ZODB Couldn't load state for 0x111310 Traceback (most recent call last): File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 662, in _load h = read(DATA_HDR_LEN) IOError: [Errno 5] Input/output error -- 2005-06-20T13:15:26 ERROR(200) Archetypes None Traceback (most recent call last): File "/zope/global-products/Archetypes/Referenceable.py", line 69, in _register cid = archetype_tool.registerContent(self) File "/zope/global-products/Archetypes/ArchetypeTool.py", line 681, in registerContent cid = self._genId(object) File "/zope/global-products/Archetypes/ArchetypeTool.py", line 659, in _genId keys = catalog.uniqueValuesFor('UID') File "/usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py", line 562, in uniqueValuesFor return self._catalog.uniqueValuesFor(name) File "/usr/local/zope/lib/python/Products/ZCatalog/Catalog.py", line 425, in uniqueValuesFor return self.getIndex(name).uniqueValues() File "/usr/local/zope/lib/python/Products/PluginIndexes/common/UnIndex.py", line 445, in uniqueValues return tuple(self._index.keys()) File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 662, in _load h = read(DATA_HDR_LEN) IOError: [Errno 5] Input/output error -- "Building Websites with Plone" http://plonebook.packtpub.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] Re: ZODB error when trying to index object (Input/output error)
Felix Ulrich-Oltean <[EMAIL PROTECTED]> writes: > Hi > > I get the following error when certain new objects are added into a > plone site - when archetypes tries to set the UID, it asks the catalog > for all unique values of the index "UID". I;ve never had input/output > errors before from the ZODB. There's definitely enough space on the > drive and objects are added fine - it's just that the UID is then not > set, which breaks all sorts of Archetypes stuff. Any ideas how I can > hunt this one down? > Some further info: I think I've found the culprits - there are 4 records which give errors like this: portal.portal_catalog.uncatalog_object('/sites/cw/data/urbanr') Traceback (most recent call last): File "", line 1, in ? File "/usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py", line 558, in uncatalog_object self._catalog.uncatalogObject(uid) File "/usr/local/zope/lib/python/Products/ZCatalog/Catalog.py", line 411, in uncatalogObject x.unindex_object(rid) File "/usr/local/zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py", line 138, in unindex_object self._index[comp][level].remove(docid) File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 665, in _load raise CorruptedDataError, h ZODB.FileStorage.CorruptedDataError: I'll try fsrecover on it. Felix. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] ZODB error when trying to index object (Input/output error)
Felix Ulrich-Oltean wrote at 2005-6-20 13:22 +0100: > ... >2005-06-20T13:15:26 ERROR(200) ZODB Couldn't load state for 0x111310 >Traceback (most recent call last): > File "/usr/local/zope/lib/python/ZODB/Connection.py", line 597, in setstate >p, serial = self._storage.load(oid, self._version) > File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 689, in load >return self._load(oid, version, self._index, self._file) > File "/usr/local/zope/lib/python/ZODB/FileStorage.py", line 662, in _load >h = read(DATA_HDR_LEN) >IOError: [Errno 5] Input/output error This means that your storage file cannot be read. Maybe, it was closed... I think, I saw similar behaviour in our ZEO server when it was shutdown while it was performing an operation in a separated thread ("undoHistory"). The shutdown signal caused the storage to be closed but the separate thread still tried to access the storage. -- 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] developing with zmi: how to move a patch from data from devel to live?
gabor wrote at 2005-6-20 08:35 +0200: > ... >but now how do you move the improvement/fix to the live server? >you cannot just copy the data.fs over. the customer already has some >content/data in it... This is possible as long you have a strict separation between content (created on the life server) and infrastructure (created in the develoment system). Configuration may be partly controlled in the life and partly in the development system. In this case, you need again a strict separation between these worlds. If this separation respects object boundaries (i.e. no updatable object contains both life and development controlled parts), then you can use Zope's export/import mechanism for the synchronization. The use of "export/import" can be automated as demonstrated by "ZSyncer" (others already suggested this solution). "ZSyncer" integrates a local export and the corresponding remote import in a single Web transaction. However, knowing your application, you can integrate such exports and imports for all your development controlled objects. If the separation crosses object boundaries, you cannot use export/import (as it would vipe out the life controlled parts of the object). We extended the basic "ZSyncer" mechanism to also synchronize partial objects. It essentially works by defining "_zsyncer__getstate__" and "_zsyncer__setstate__" methods that extract and import partial content. @Paul: let me know if you are interested in this ZSyncer extension. -- 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] accessing session data error
Hi all: I think that I found a ZOPE bug. Is really very important for me know what can I do for avoid it. The first 9 steps are to recreate the situation and the other steps are to provoke the error. Step 1: Crate a folder called "reproducingError" in Zope Interface Manage Step 2: create a page template called "index_html" in the "reproducingError" folder with the following content:" " Step 3: create a python script called "init" in the "reproducingError" folder with the following content:"# init scriptsessionData = container.REQUEST.SESSIONsessionData.set("userId", container.REQUEST.user) return context.init2_html()" Step 4: create a page template called "init2_html" in the "reproducingError" folder with the following content:"passing face 2" Step 5: create a python script called "init2" in the "reproducingError" folder with the following content:"# init2 scriptrequest = context.REQUESTsessionData = request.SESSION sessionData.set('idService', 'testService') context.first()return context.external(context)" Step 6: create a page template called "first_html" in the "reproducingError" folder with the following content:"First Response" Step 7: create a python script called "first" in the "reproducingError" folder with the following content:"# first scriptresponse = container.REQUEST.RESPONSEstr = container.first_html() response.write(str)response.flush()" Step 8: create an external method called "external" in the "reproducingError" folder with the following content, in where the function of the external method is "communicationResponse" and the module is any name that you give to the file:"# external methodimport time def communicationResponse(context): response = context.REQUEST.RESPONSE sessionData = context.REQUEST.SESSION strDetailEnd = "window.location='reproducingError/end'" for item in range(1, 40): time.sleep(3) response.write("Response iteration:" + str(item)) response.flush() response.write(strDetailEnd) response.flush()" Step 9: create a python script called "end" in the "reproducingError" folder with the following content:"# end scriptidService = context.REQUEST.SESSION['idService'] return "Fin - " + idService" Step 10: open two explorer in wich call the object "reproducingError" (Example: localhost:8080/reproducingError) Step 11: enter an example text in each one. Step 12: clink in the link of one of them, and 5 second later clink on the link of the other explorer. The waiting for around 5 second is necesary because with other time interval not allways get the error. Stpe 13: and wait the "Response iteration"... Please if the error don't appear in any of the pages, begins at Step 9 again. and try to count to 5 witch other velocity :) The correct result is:"Fin - testService" The error is:" Site ErrorAn error was encountered while publishing this resource. Error Type: KeyErrorError Value: 'idService'"The traceback: "Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 2, in end - - Line 2 Module AccessControl.ZopeGuards, line 67, in guarded_getitem Module Products.Transience.TransientObject, line 176, in __getitem__KeyError: 'idService'" I will appreciate if you try until the error appear, because I not always obtain the error. I thinks that it is bacause the time interval between the two request. A curious thing is that when I obtain the error, if I wait around 15 second and refresh the page in wich i obtain the error, the correct result appear.. and no errors come. Sorry for the extended message, but I need any help that you can give me, because this describe error environment imitate a funcionality that I must give in a system very import that i'm doing. I'm using Zope 2.7.6 for Windows. Thanks in advanced. Leticia ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] ZMYSQLDA 2.0.9 lock problem
IE, Zope 2.7.6, Python 2.4.1, MYSQLDA 2.0.9 One of our developers is reporting a curious problem, which I have not been able to track down. It appears to be threading related, somewhere in the ZBMYSQLDB adaptor. The database connection string is bare of transaction indicators. The database is local. All tables are MyISAM which is non-transactioal. Unfortunately the user does not remember the exact sequence of events which generate the problem so I am unable to duplicate. What we do know is that the problem occurs at the beginning of a development session begun with a cold boot of the client machine and a fresh browser and it occurs once and only onece during the development session. The developer normally has two active Zope threads going--one working with the application and one working with the ZMI. He moves between them using the Open/View tab and other buttons. He reports that the first time he moves focus from the ZMI to the application, he gets the following error: --- Time 2005/06/20 07:12:03.478 GMT-7 User Name (User Id) (X) Request URL http://xxx..com/logged_in Exception Type error Exception Value release unlocked lock Traceback (innermost last): * Module ZPublisher.Publish, line 107, in publish * Module Zope.App.startup, line 222, in commit * Module ZODB.Transaction, line 260, in commit * Module ZODB.Transaction, line 377, in _finish_many * Module Shared.DC.ZRDB.TM, line 59, in tpc_finish * Module Products.ZMySQLDA.db, line 376, in _finish error: release unlocked lock The lock being released is a transactional lock. None of our locks should be transactional locks, given our setup. I traced through the __init__() method for DB and did not see how transactional locking could be specified so the lock relaease code could run--I must be missing something. No thread in our system uses transactional locking as the tables do no support transactions. The logged_in method references the MySQL database in several places; a couple of them are compound queries where multiple queries are joined by "" values. Many of our queries use this in combination with the "use " SQL query. The system is using ZODB filestorage (Data.fs) with ZEO and is pretty much out of the box. Has anyone else encountrered a similar problem. Any suggestions as to how to find this bug? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problem with keep-alive timeout
I made a small and simple database applikation with some reports on a large database. But surprise, IE 6.0 (WinXP,SP2) is getting always a timeout after 60seconds, because IE communicates with Zope through the HTTP1.0-protocoll. My reports needing always 40s-120s, so is there someone that could give me a solution for this annoying timeout 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] Problem with keep-alive timeout
I had a similar problem and solved it by having a cron job that runs in the background with wget. In my case was able to divid it up to run a little bit of the big report at a time. This way I'm now able to have a cron job happening every hour. On 6/20/05, Ralph <[EMAIL PROTECTED]> wrote: > > I made a small and simple database applikation with some reports on a large > database. But surprise, IE 6.0 (WinXP,SP2) is getting always a timeout after > 60seconds, because IE communicates with Zope through the HTTP1.0-protocoll. > My reports needing always 40s-120s, so is there someone that could give me a > solution for this annoying timeout 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 ) > -- 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 )
Re: [Zope] accessing session data error
Hi Leticia, Thanks for the detailed bug report. I have tried to replicate the bug as you indicate below but cannot. I've gone through the process you describe ten times without errors (in Zope 2.7.6). If it's possible to simplify the steps to recreate the error, that would be helpful in further debugging (for example, maybe just getting rid of all the page templates and python scripts and just using a single external method). - C On Mon, 2005-06-20 at 14:20 -0400, Leticia Larrosa wrote: > Hi all: > > I think that I found a ZOPE bug. Is really very important for me know > what can I do for avoid it. The first 9 steps are to recreate the > situation and the other steps are to provoke the error. > > Step 1: Crate a folder called "reproducingError" in Zope Interface > Manage > > Step 2: create a page template called "index_html" in the > "reproducingError" folder with the following content: > " > > > > > > " > > Step 3: create a python script called "init" in the "reproducingError" > folder with the following content: > " > # init script > sessionData = container.REQUEST.SESSION > sessionData.set("userId", container.REQUEST.user) > return context.init2_html() > " > > Step 4: create a page template called "init2_html" in the > "reproducingError" folder with the following content: > " > > passing face 2 > " > > Step 5: create a python script called "init2" in the > "reproducingError" folder with the following content: > " > # init2 script > request = context.REQUEST > sessionData = request.SESSION > sessionData.set('idService', 'testService') > context.first() > return context.external(context) > " > > Step 6: create a page template called "first_html" in the > "reproducingError" folder with the following content: > " > First Response > " > > Step 7: create a python script called "first" in the > "reproducingError" folder with the following content: > " > # first script > response = container.REQUEST.RESPONSE > str = container.first_html() > response.write(str) > response.flush() > " > > Step 8: create an external method called "external" in the > "reproducingError" folder with the following content, in where the > function of the external method is "communicationResponse" and the > module is any name that you give to the file: > " > # external method > import time > def communicationResponse(context): > response = context.REQUEST.RESPONSE > sessionData = context.REQUEST.SESSION > strDetailEnd = > "window.location='reproducingError/end'" > > for item in range(1, 40): > time.sleep(3) > response.write("Response iteration:" + str(item)) > response.flush() > response.write(strDetailEnd) > response.flush() > " > > Step 9: create a python script called "end" in the "reproducingError" > folder with the following content: > " > # end script > idService = context.REQUEST.SESSION['idService'] > return "Fin - " + idService > " > > Step 10: open two explorer in wich call the object > "reproducingError" (Example: localhost:8080/reproducingError) > > Step 11: enter an example text in each one. > > Step 12: clink in the link of one of them, and 5 second later clink on > the link of the other explorer. The waiting for around 5 second is > necesary because with other time interval not allways get the error. > > Stpe 13: and wait the "Response iteration"... Please if the error > don't appear in any of the pages, begins at Step 9 again. and try to > count to 5 witch other velocity :) > > The correct result is: > " > Fin - testService > " > > The error is: > " > Site Error > An error was encountered while publishing this resource. > Error Type: KeyError > Error Value: 'idService' > " > The traceback: > " > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.Scripts.Bindings, line 306, in __call__ > Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec > Module Products.PythonScripts.PythonScript, line 323, in _exec > Module None, line 2, in end >- >- Line 2 > Module AccessControl.ZopeGuards, line 67, in guarded_getitem > Module Products.Transience.TransientObject, line 176, in __getitem__ > KeyError: 'idService' > " > > I will appreciate if you try until the error appear, because I not > always obtain the error. I thinks that it is bacause the time interval > between the two request. > > A curious thing is that when I obtain the error, if I wait around 15 > second and refresh the page in wich i obtain the error, the correct > result appear.. and no errors come. > > Sorry for the extended message, but I need any help that you can give > me, because this describe error environment imitate a funcionality > that I must give in a system very import that i'm doing. > > I'm using Zope 2.7.6 for Windows. > > Thanks in advanced. > Leticia > _
Re: [Zope] accessing session data error
Hi: Thanks for the rapid aswer of Chris McDonough. I will change the steps to replicate the error (sorry for the large steps before :( , I thinks that maybe was needful). Remember that the key of the error is the time interval between the request. If with 5 seconds don't appear the error try to vary to other, like 7 seconds. The 5 first steps are to create the situation and the sixth step are to provoke the error Step 1: Create a folder called "reproducingError" in Zope Interface Manage Step 2: Create a srcipt "end" with the content: " # end scriptidService = context.REQUEST.SESSION['idService'] return "Fin - " + idService" Step 3: Create a script "index_html" with the content: " # init scriptsessionData = container.REQUEST.SESSION sessionData.set("userId", "userExample")return context.init2() " Step 4: Create a script "init2" with the content: " # init2 scriptrequest = context.REQUESTsessionData = request.SESSIONsessionData.set('idService', 'testService')return context.external(context) " Step 5:create an external method called "external" in the "reproducingError" folder with the following content, in where the function of the external method is "communicationResponse" and the module is any name that you give to the file: " # external methodimport time def communicationResponse(context): response = context.REQUEST.RESPONSE sessionData = context.REQUEST.SESSION strDetailEnd = "window.location='reproducingError/end'" for item in range(1, 40): time.sleep(3) response.write("Response iteration:" + str(item)) response.flush() response.write(strDetailEnd) response.flush() " Step 6: open two explorer In one of them call the object "reproducingError" (Example: localhost:8080/reproducingError), then wait 5 second and put in the other the same direction. And wait the iterations Note: I count 5 second, not with chronometer. You can try with a near number. Chris: I reproduce the error with the steps. I can't reduce it to an external method. Thanks again. The error that I obtain is the same: " Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 2, in end - - Line 2 Module AccessControl.ZopeGuards, line 67, in guarded_getitem Module Products.Transience.TransientObject, line 176, in __getitem__KeyError: 'idService' " Remember: > > A curious thing is that when I obtain the error, if I wait around 15> > second and refresh the page in wich i obtain the error, the correct> > result appear.. and no errors come. > > I'm using Zope 2.7.6 for Windows. I must solve this, because this is part of my thesis for university graduation. Any help will be appreciated. Thanks in advance, Leticia Larrosa -Original Message-From: Chris McDonough <[EMAIL PROTECTED]>To: Leticia Larrosa <[EMAIL PROTECTED]>Cc: zope@zope.orgDate: Mon, 20 Jun 2005 15:12:21 -0400Subject: Re: [Zope] accessing session data error > Hi Leticia,> > Thanks for the detailed bug report. > > I have tried to replicate the bug as you indicate below but cannot.> I've gone through the process you describe ten times without errors (in> Zope 2.7.6).> > If it's possible to simplify the steps to recreate the error, that> would> be helpful in further debugging (for example, maybe just getting rid of> all the page templates and python scripts and just using a single> external method).> > - C> > > On Mon, 2005-06-20 at 14:20 -0400, Leticia Larrosa wrote:> > Hi all: > > > > I think that I found a ZOPE bug. Is really very important for me know> > what can I do for avoid it. The first 9 steps are to recreate the> > situation and the other steps are to provoke the error.> > > > Step 1: Crate a folder called "reproducingError" in Zope Interface> > Manage > > > > Step 2: create a page template called "index_html" in the> > "reproducingError" folder with the following content:> > "> > > > > > > > > > > > "> > > > Step 3: create a python script called "init" in the > "reproducingError"> > folder with the following content: > > "> > # init script> > sessionData = container.REQUEST.SESSION> > sessionData.set("userId", container.REQUEST.user)> > return context.init2_html()> > "> > > > Step 4: create a page template called "init2_html" in the> > "reproducingError" folder with the following content:> > "> > > > passing face 2> > "> > > > Step 5: create a python script called "init2" in the> > "reproducingError" folder with the following content:> > "> > # init2 script > > request = context.REQUEST> > sessionData = request.SESSION> > sessionData.set('idService', 'testService') > > context.first()> > return context.ext
Re: [Zope] accessing session data error
Hi: I follow the steps to replicate the error in zope2.7 for Debian and i get the error to. Thanks in advanced, Leticia -Original Message-From: "Leticia Larrosa" <[EMAIL PROTECTED]>To: "Chris McDonough" <[EMAIL PROTECTED]>Cc: zope@zope.orgDate: Mon, 20 Jun 2005 16:25:08 -0400Subject: Re: [Zope] accessing session data error Hi: Thanks for the rapid aswer of Chris McDonough. I will change the steps to replicate the error (sorry for the large steps before :( , I thinks that maybe was needful). Remember that the key of the error is the time interval between the request. If with 5 seconds don't appear the error try to vary to other, like 7 seconds. The 5 first steps are to create the situation and the sixth step are to provoke the error Step 1: Create a folder called "reproducingError" in Zope Interface Manage Step 2: Create a srcipt "end" with the content: " # end scriptidService = context.REQUEST.SESSION['idService'] return "Fin - " + idService" Step 3: Create a script "index_html" with the content: " # init scriptsessionData = container.REQUEST.SESSION sessionData.set("userId", "userExample")return context.init2() " Step 4: Create a script "init2" with the content: " # init2 scriptrequest = context.REQUESTsessionData = request.SESSIONsessionData.set('idService', 'testService')return context.external(context) " Step 5:create an external method called "external" in the "reproducingError" folder with the following content, in where the function of the external method is "communicationResponse" and the module is any name that you give to the file: " # external methodimport time def communicationResponse(context): response = context.REQUEST.RESPONSE sessionData = context.REQUEST.SESSION strDetailEnd = "window.location='reproducingError/end'" for item in range(1, 40): time.sleep(3) response.write("Response iteration:" + str(item)) response.flush() response.write(strDetailEnd) response.flush() " Step 6: open two explorer In one of them call the object "reproducingError" (Example: localhost:8080/reproducingError), then wait 5 second and put in the other the same direction. And wait the iterations Note: I count 5 second, not with chronometer. You can try with a near number. Chris: I reproduce the error with the steps. I can't reduce it to an external method. Thanks again. The error that I obtain is the same: " Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 2, in end - - Line 2 Module AccessControl.ZopeGuards, line 67, in guarded_getitem Module Products.Transience.TransientObject, line 176, in __getitem__KeyError: 'idService' " Remember: > > A curious thing is that when I obtain the error, if I wait around 15> > second and refresh the page in wich i obtain the error, the correct> > result appear.. and no errors come. > > I'm using Zope 2.7.6 for Windows. I must solve this, because this is part of my thesis for university graduation. Any help will be appreciated. Thanks in advance, Leticia Larrosa -Original Message-From: Chris McDonough <[EMAIL PROTECTED]>To: Leticia Larrosa <[EMAIL PROTECTED]>Cc: zope@zope.orgDate: Mon, 20 Jun 2005 15:12:21 -0400Subject: Re: [Zope] accessing session data error > Hi Leticia,> > Thanks for the detailed bug report. > > I have tried to replicate the bug as you indicate below but cannot.> I've gone through the process you describe ten times without errors (in> Zope 2.7.6).> > If it's possible to simplify the steps to recreate the error, that> would> be helpful in further debugging (for example, maybe just getting rid of> all the page templates and python scripts and just using a single> external method).> > - C> > > On Mon, 2005-06-20 at 14:20 -0400, Leticia Larrosa wrote:> > Hi all: > > > > I think that I found a ZOPE bug. Is really very important for me know> > what can I do for avoid it. The first 9 steps are to recreate the> > situation and the other steps are to provoke the error.> > > > Step 1: Crate a folder called "reproducingError" in Zope Interface> > Manage > > > > Step 2: create a page template called "index_html" in the> > "reproducingError" folder with the following content:> > "> > > > > > > > > > > > "> > > > Step 3: create a python script called "init" in the > "reproducingError"> > folder with the following content: > > "> > # init script> > sessionData = container.REQUEST.SESSION> > sessionData.set("userId", container.REQUEST.user)> > return context.init2_html()> > "> > > > Step 4: create a page template called "init2_html" in the> > "reproducingError" folder with the fo
[Zope] installation problem
Hi- I got zope 2.8 installed on fedora core 4. Whenever I execute this command to start zope /usr/local/zope/instance/bin/runzope, I get this error: Error: The object named by "DBTab.ClassFactories.autoClassFactory" could not be imported Traceback (most recent call last): File "/usr/local/zope/lib/python/Zope2/Startup/datatypes.py", line 93, in importable_name package = __import__(n, g, g, component) File "/usr/local/zope/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/zope/lib/python/OFS/Uninstalled.py", line 16, in ? import SimpleItem, Globals, Acquisition File "/usr/local/zope/lib/python/OFS/SimpleItem.py", line 25, in ? import Globals, App.Management, Acquisition, App.Undo File "/usr/local/zope/lib/python/Globals.py", line 23, in ? import Acquisition, ComputedAttribute, App.PersistentExtra, os File "/usr/local/zope/lib/python/App/PersistentExtra.py", line 16, in ? from class_init import default__class_init__ File "/usr/local/zope/lib/python/App/class_init.py", line 14, in ? from AccessControl.PermissionRole import PermissionRole File "/usr/local/zope/lib/python/AccessControl/__init__.py", line 17, in ? from Implementation import setImplementation File "/usr/local/zope/lib/python/AccessControl/Implementation.py", line 98, in ? setImplementation("C") File "/usr/local/zope/lib/python/AccessControl/Implementation.py", line 51, in setImplementation from AccessControl import ImplC as impl File "/usr/local/zope/lib/python/AccessControl/ImplC.py", line 29, in ? from ImplPython import RestrictedDTML, SecurityManager ImportError: No module named ImplPython (line 914 in file:///usr/local/zope/instance/etc/zope.conf) For help, use /usr/local/zope/lib/python/Zope2/Startup/run.py -h I noticed that this affected other people from some discussions, but I couldn't find any solution. Does anybody have an idea where I can start? My buddy got his working on fedora core 4 fine, so it shouldn't be a problem. When I first compiled zope, I used this command. "./configure --prefix=/usr/loca/zope --with-python=/usr/bin/python2.4". Any help would be much appreciated! -Tyson ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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 Foundation ideas
In preparation for tomorrow's IRC session (reminder/details below) we have prepared some initial ideas about the Zope Foundation. These are available online at: o http://tinyurl.com/74pd3 Note -- the document is written with phrases like "the Foundation will", "Contributors shall", etc. This is NOT to be interpreted as though these terms/conditions are predetermined. It is written to close in on specific language that avoids misinterpretation. Zope Foundation IRC Session --- IRC Session Summary: - Who: Zope Corp and Zope Community - What: IRC session to discuss the Zope Foundation - When: Tue, 21 Jun 2005 10a - 12p (US EDT) - Where: irc.freenode.net #zope Please send specific questions to: mailto:[EMAIL PROTECTED] Hope to see you there. Regards, Rob -- Rob PageV: 540.361.1710 Zope CorporationF: 703.995.0412 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] accessing session data error
Hi Leticia, The mixture of ``response.write()`` including JavaScript to drive the browser to a new location along with writing objects in ZODB all within the same transaction can break some of the promises that you'd normally expect Zope and a browser to keep. My guess is that browser is being told to visit ``end`` before the transaction started by ``init2`` has finished. Perhaps a conflict error is causing that transaction to take longer than you expect. Normally this would not trip you up as your browser does not see anything until after the transaction has finished. (In this normal mode you might see a conflict error rendered in the browser if the publication machinery had to give up.) For your example try breaking up ``init2`` into two scripts. The first that writes the session data and then redirects the browser to the second. The second then does not touch session data and manages all the ``response.write()``s. And remove the unused ``sessionData = context.REQUEST.SESSION`` from ``external``. Cheers Michael On 21/06/2005, at 6:20 AM, Leticia Larrosa wrote: Hi all: I think that I found a ZOPE bug. Is really very important for me know what can I do for avoid it. The first 9 steps are to recreate the situation and the other steps are to provoke the error. Step 1: Crate a folder called "reproducingError" in Zope Interface Manage Step 2: create a page template called "index_html" in the "reproducingError" folder with the following content: " " Step 3: create a python script called "init" in the "reproducingError" folder with the following content: " # init script sessionData = container.REQUEST.SESSION sessionData.set("userId", container.REQUEST.user) return context.init2_html() " Step 4: create a page template called "init2_html" in the "reproducingError" folder with the following content: " passing face 2 " Step 5: create a python script called "init2" in the "reproducingError" folder with the following content: " # init2 script request = context.REQUEST sessionData = request.SESSION sessionData.set('idService', 'testService') context.first() return context.external(context) " Step 6: create a page template called "first_html" in the "reproducingError" folder with the following content: " First Response " Step 7: create a python script called "first" in the "reproducingError" folder with the following content: " # first script response = container.REQUEST.RESPONSE str = container.first_html() response.write(str) response.flush() " Step 8: create an external method called "external" in the "reproducingError" folder with the following content, in where the function of the external method is "communicationResponse" and the module is any name that you give to the file: " # external method import time def communicationResponse(context): response = context.REQUEST.RESPONSE sessionData = context.REQUEST.SESSION strDetailEnd = "
[Zope] ZPT tutorial
Does a ZPT tutorial exist anywhere? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] ZPT tutorial
Don't know of a good tutorial but I know there are many. I'm sure that plone.org has some good ones. In case you already know your DTML, this little howto has helped people a lot. http://www.zope.org/Members/peterbe/DTML2ZPT On 6/20/05, John Poltorak <[EMAIL PROTECTED]> wrote: > > Does a ZPT tutorial exist anywhere? > > > -- > John > > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** 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 )
Re: [Zope] ZPT tutorial
On 20.Jun 2005 - 23:45:34, John Poltorak wrote: > > Does a ZPT tutorial exist anywhere? How about the 2 chapters in the Zope book? Andreas -- You are so boring that when I see you my feet go to sleep. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** 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] New External Editor release 0.9
Since Casey Duncan, the original author of Zope External Editor is happily hacking away on other things at a new job, I figure I might as well pick up maintenance of this product. The new location for External Editor releases will be: http://plope.com/software/ExternalEditor/ A new release (0.9) is available at that location and the changes for the release are visible at http://plope.com/software/ExternalEditor/CHANGES-0.9.txt . Most changes in this release are aimed at improving zopeedit behavior under Windows. Have fun! - C ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] installation problem
--On 20. Juni 2005 16:43:53 -0500 tyson <[EMAIL PROTECTED]> wrote: Hi- I got zope 2.8 installed on fedora core 4. Whenever I execute this command to start zope /usr/local/zope/instance/bin/runzope, I get this error: Error: The object named by "DBTab.ClassFactories.autoClassFactory" could not be imported Traceback (most recent call last): File "/usr/local/zope/lib/python/Zope2/Startup/datatypes.py", line 93, in importable_name package = __import__(n, g, g, component) File "/usr/local/zope/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/zope/lib/python/OFS/Uninstalled.py", line 16, in ? import SimpleItem, Globals, Acquisition File "/usr/local/zope/lib/python/OFS/SimpleItem.py", line 25, in ? import Globals, App.Management, Acquisition, App.Undo File "/usr/local/zope/lib/python/Globals.py", line 23, in ? import Acquisition, ComputedAttribute, App.PersistentExtra, os File "/usr/local/zope/lib/python/App/PersistentExtra.py", line 16, in ? from class_init import default__class_init__ File "/usr/local/zope/lib/python/App/class_init.py", line 14, in ? from AccessControl.PermissionRole import PermissionRole File "/usr/local/zope/lib/python/AccessControl/__init__.py", line 17, in ? from Implementation import setImplementation File "/usr/local/zope/lib/python/AccessControl/Implementation.py", line 98, in ? setImplementation("C") File "/usr/local/zope/lib/python/AccessControl/Implementation.py", line 51, in setImplementation from AccessControl import ImplC as impl File "/usr/local/zope/lib/python/AccessControl/ImplC.py", line 29, in ? from ImplPython import RestrictedDTML, SecurityManager ImportError: No module named ImplPython (line 914 in file:///usr/local/zope/instance/etc/zope.conf) For help, use /usr/local/zope/lib/python/Zope2/Startup/run.py -h I noticed that this affected other people from some discussions, but I couldn't find any solution. Does anybody have an idea where I can start? My buddy got his working on fedora core 4 fine, so it shouldn't be a problem. When I first compiled zope, I used this command. "./configure --prefix=/usr/loca/zope --with-python=/usr/bin/python2.4". Any help would be much appreciated! Try to compile Zope with a *fresh* Python 2.3.X installation and not with the FC4 Python. 2.4 is btw. not supported as documented and and as posted a hundred times. -aj pgpchYyuwPzBX.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] ZPT tutorial
--On 20. Juni 2005 23:45:34 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: Does a ZPT tutorial exist anywhere? Aren't the *three* ZPT chapters in the Zope Book good enough? -aj pgpRrnfGY61Jv.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] ZPT tutorial
Everyone, I think the ZPT tutorials are excellent. Both "Using Page Templates" and "Advanced Page Templates" are worth reading more than once. David Andreas Jung wrote: --On 20. Juni 2005 23:45:34 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: Does a ZPT tutorial exist anywhere? Aren't the *three* ZPT chapters in the Zope Book good enough? -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 )