From kosh at aesaeion.com Sat Jan 2 00:42:07 2010 From: kosh at aesaeion.com (William Heymann) Date: Fri, 1 Jan 2010 22:42:07 -0700 Subject: [Zope] exUserFolder and Zope 2.12 In-Reply-To: <20091217164807.GI1202@camelot.theinternet.com.au> References: <20091217164807.GI1202@camelot.theinternet.com.au> Message-ID: <201001012242.07624.kosh@aesaeion.com> On Thursday 17 December 2009, Andrew Milton wrote: > +-------[ Baiju M ]---------------------- > > | Hi, > | In exUserFolder there are few exceptions raised like this: > | > | raise 'LoginRequired', self.docLogin(self, request) > | > | This will not working in Zope 2.12 (Python 2.6) > | > | Any idea, how to change it ? > > Replace the raise with; > > request.RESPONSE.setStatus(401) > request.RESPONSE.setHeader('Content-Type','text/html') > request.RESPONSE.write(self.docLogin(self,request)) > I just tried that and it works in Firefox, Chrome and Opera but it is failing in IE and Konqueror. I tried a few versions of each of these browsers and the results are consistent. I don't see why it is failing though. I tried exactly what is up there along with also trying self.docLoginRedirect instead of docLogin. I used wireshark to watch the connection and I don't see anything wrong with it. GET /XXXXXX/manage HTTP/1.1 Host: XXXX.XXXXXX.com Connection: Keep-Alive User-Agent: Mozilla/5.0 (compatible; Konqueror/4.3; Linux) KHTML/4.3.4 (like Gecko) Pragma: no-cache Cache-control: no-cache Accept: text/html, image/jpeg;q=0.9, image/png;q=0.9, text/*;q=0.9, image/*;q=0.9, */*;q=0.8 Accept-Encoding: x-gzip, x-deflate, gzip, deflate Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5 Accept-Language: en-US, en Cookie: tree-s="XXXXXXXXXXXXXXx"; __utma=XXXXXX.XXXXXX.XXXXXXXXX.XXXXXXXX.XXXXX.XXX; _ZopeId="XXXXX" HTTP/1.1 401 Unauthorized Date: Sat, 02 Jan 2010 05:31:47 GMT Server: Zope/(2.12.1, python 2.6.4, linux2) ZServer/1.1 Content-Type: text/html Via: 1.1 XXX.XXXX.com Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked 386 Logging In 0 If I go to the page that the Refresh refers to in any of the browers that works fine. The raise form works fine on older versions of zope with no issues on any of these browers. Konqueror and IE will both have their icons spinning on that page like they are waiting for something. Any ideas or help would be appreciated. I have tried lots of things to get it working. From akm at theinternet.com.au Sat Jan 2 01:22:46 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Sat, 2 Jan 2010 17:22:46 +1100 Subject: [Zope] exUserFolder and Zope 2.12 In-Reply-To: <201001012242.07624.kosh@aesaeion.com> References: <20091217164807.GI1202@camelot.theinternet.com.au> <201001012242.07624.kosh@aesaeion.com> Message-ID: <20100102062246.GA1638@camelot.theinternet.com.au> +-------[ William Heymann ]---------------------- | | On Thursday 17 December 2009, Andrew Milton wrote: | > +-------[ Baiju M ]---------------------- | > | > | Hi, | > | In exUserFolder there are few exceptions raised like this: | > | | > | raise 'LoginRequired', self.docLogin(self, request) | > | | > | This will not working in Zope 2.12 (Python 2.6) | > | | > | Any idea, how to change it ? | > | > Replace the raise with; | > | > request.RESPONSE.setStatus(401) | > request.RESPONSE.setHeader('Content-Type','text/html') | > request.RESPONSE.write(self.docLogin(self,request)) | > | | I just tried that and it works in Firefox, Chrome and Opera but it is failing | in IE and Konqueror. I tried a few versions of each of these browsers and | the results are consistent. I don't see why it is failing though. | | I tried exactly what is up there along with also trying self.docLoginRedirect | instead of docLogin. I used wireshark to watch the connection and I don't see | anything wrong with it. [SNIP] | | If I go to the page that the Refresh refers to in any of the browers that | works fine. The raise form works fine on older versions of zope with no issues | on any of these browers. Konqueror and IE will both have their icons spinning | on that page like they are waiting for something. | | Any ideas or help would be appreciated. I have tried lots of things to get | it working. Try adding more padding ... IE (not sure about Konq) has this annoying habit of giving you a "nice" page instead of the one we want... it used to be if the page was < 512 bytes it would give you its own page... I'll try to look into it over the weekend... -- Andrew Milton akm at theinternet.com.au From akm at theinternet.com.au Sat Jan 2 01:44:06 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Sat, 2 Jan 2010 17:44:06 +1100 Subject: [Zope] exUserFolder and Zope 2.12 In-Reply-To: <20100102062246.GA1638@camelot.theinternet.com.au> References: <20091217164807.GI1202@camelot.theinternet.com.au> <201001012242.07624.kosh@aesaeion.com> <20100102062246.GA1638@camelot.theinternet.com.au> Message-ID: <20100102064406.GB1638@camelot.theinternet.com.au> +-------[ Andrew Milton ]---------------------- | +-------[ William Heymann ]---------------------- | | | | On Thursday 17 December 2009, Andrew Milton wrote: | | > +-------[ Baiju M ]---------------------- | | > | | > | Hi, | | > | In exUserFolder there are few exceptions raised like this: | | > | | | > | raise 'LoginRequired', self.docLogin(self, request) | | > | | | > | This will not working in Zope 2.12 (Python 2.6) | | > | | | > | Any idea, how to change it ? | | > | | > Replace the raise with; | | > | | > request.RESPONSE.setStatus(401) | | > request.RESPONSE.setHeader('Content-Type','text/html') | | > request.RESPONSE.write(self.docLogin(self,request)) | | > | | | | I just tried that and it works in Firefox, Chrome and Opera but it is failing | | in IE and Konqueror. I tried a few versions of each of these browsers and | | the results are consistent. I don't see why it is failing though. | | | | I tried exactly what is up there along with also trying self.docLoginRedirect | | instead of docLogin. I used wireshark to watch the connection and I don't see | | anything wrong with it. | | [SNIP] | | | | | If I go to the page that the Refresh refers to in any of the browers that | | works fine. The raise form works fine on older versions of zope with no issues | | on any of these browers. Konqueror and IE will both have their icons spinning | | on that page like they are waiting for something. | | | | Any ideas or help would be appreciated. I have tried lots of things to get | | it working. | | Try adding more padding ... | | IE (not sure about Konq) has this annoying habit of giving you a "nice" | page instead of the one we want... it used to be if the page was < 512 | bytes it would give you its own page... | | I'll try to look into it over the weekend... I have 2.10 not 2.12, but for FF, Shiretoko (64 bit FF 3.5.5), IE7/IE8 (32 and 64 bit), Safari (4.0.4) all work fine with this method. Konquerer does seem to have an issue, but, I don't know enough about Konquerer to work out what to try. -- Andrew Milton akm at theinternet.com.au From mbaiju at zeomega.com Sat Jan 2 03:12:08 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sat, 2 Jan 2010 13:42:08 +0530 Subject: [Zope] exUserFolder and Zope 2.12 In-Reply-To: <201001012242.07624.kosh@aesaeion.com> References: <20091217164807.GI1202@camelot.theinternet.com.au> <201001012242.07624.kosh@aesaeion.com> Message-ID: On Sat, Jan 2, 2010 at 11:12 AM, William Heymann wrote: > On Thursday 17 December 2009, Andrew Milton wrote: >> +-------[ Baiju M ]---------------------- >> >> | Hi, >> | ? ? In exUserFolder there are few exceptions raised like this: >> | >> | raise 'LoginRequired', self.docLogin(self, request) >> | >> | This will not working in Zope 2.12 (Python 2.6) >> | >> | Any idea, how to change it ? >> >> Replace the raise with; >> >> request.RESPONSE.setStatus(401) >> request.RESPONSE.setHeader('Content-Type','text/html') >> request.RESPONSE.write(self.docLogin(self,request)) >> > > I just tried that and it works in Firefox, Chrome and Opera but it is failing > in IE and Konqueror. I tried a few versions of each of these browsers and > the results are consistent. I don't see why it is failing though. > > I tried exactly what is up there along with also trying self.docLoginRedirect > instead of docLogin. I used wireshark to watch the connection and I don't see > anything wrong with it. FYI, the solution suggested by Andrew worked for us in IE & FF. Regards, Baiju M From marko at oktober.nl Mon Jan 4 07:16:40 2010 From: marko at oktober.nl (Marko Kruijer) Date: Mon, 04 Jan 2010 13:16:40 +0100 Subject: [Zope] generate unique user id, without cookies Message-ID: <4B41DC28.1000809@oktober.nl> after having some weird issues with Sessions and ZEO usage I've found out part of the problem. It turns out certain browsers (IE6 mostly) save the session ID cookies, but sometimes these disappear. This results in a new _ZopeId being generated and thus the new session is empty. At first i thought it was a session product problem, but in recreating this with my own session management (mysql based) the same issue arises. I don't know why this happens, the only obstacle I'm facing now is to create an adequate solution ;) Because the cookie method is not flawless we've decided to create a way to uniquely determine a user without using a client side cookie, we are already using the IP address for this, Of course that is not enough, so I was wondering what other 'unique' elements could be used for this. I've thought about adding user agent, but this is to general I think. Internal IP would be ideal, but I'm not sure this can be done (probably not). Maybe there are also 'other' zope session products that work in another way and might fix my problems as a whole? From dev101 at magma.ca Mon Jan 4 12:34:46 2010 From: dev101 at magma.ca (Jonathan (dev101)) Date: Mon, 4 Jan 2010 12:34:46 -0500 Subject: [Zope] generate unique user id, without cookies References: <4B41DC28.1000809@oktober.nl> Message-ID: <88674C7BE4A34C5AB63E3EE2DA35BA80@JHDesktop> > after having some weird issues with Sessions and ZEO usage I've found > out part of the problem. > It turns out certain browsers (IE6 mostly) save the session ID cookies, > but sometimes these disappear. This results in a new _ZopeId being > generated and thus the new session is empty. > > At first i thought it was a session product problem, but in recreating > this with my own session management (mysql based) the same issue arises. > > I don't know why this happens, the only obstacle I'm facing now is to > create an adequate solution ;) The cookie approach should work. You should be able to set persistent cookies on the client browsers (unless the browser has cookies disabled, in which case you should tell the user that they must enable cookies if they want to proceed). If you can't set persistent cookies then it could be due to a cross-browser scripting problem (ie. you are setting a cookie within an iframe that is loaded from a third-party site) or you are not setting the appropriate fields in the cookie to make it persistent. You should try to investigate the cause of the "cookie disappearance" (use a tool to look at the http headers that are sent/received). If you can't get cookies to work then you need to give users unique links (ie. embed their id in an html link) or force the users to log in. Jonathan From tseaver at palladion.com Mon Jan 4 14:07:13 2010 From: tseaver at palladion.com (Tres Seaver) Date: Mon, 04 Jan 2010 14:07:13 -0500 Subject: [Zope] generate unique user id, without cookies In-Reply-To: <88674C7BE4A34C5AB63E3EE2DA35BA80@JHDesktop> References: <4B41DC28.1000809@oktober.nl> <88674C7BE4A34C5AB63E3EE2DA35BA80@JHDesktop> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonathan (dev101) wrote: > If you can't get cookies to work then you need to give users unique links > (ie. embed their id in an html link) or force the users to log in. For ideas on how to do the URL-embedded session ID stuff, take a look at the URL related APIs of the BrowserIdManager: - isBrowserIdFromUrl - encodeUrl - getAutoUrlEncoding - setAutoUrlEncoding The last two are probably what you want: if set, they cause all generated URLs to include the prefix '/{browser_id_name}/{browser_id}, which then gets picked out of the URL and stashed during traversal: this should give you the behavior you need, assuming that all URLs are being generated using 'absolute_url' and friends. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktCPFwACgkQ+gerLs4ltQ4m0ACgxKqJXlwAunOYYlJqrnaKsemJ 7bQAnjsbKOt6lLMd4PUe5iGniKW0MdeB =Xxka -----END PGP SIGNATURE----- From gaute at div.org Wed Jan 6 03:41:57 2010 From: gaute at div.org (Gaute Amundsen) Date: Wed, 06 Jan 2010 09:41:57 +0100 Subject: [Zope] zeo cache-size tuning - number of obj. vs MB Message-ID: <1262767317.28850.375.camel@totiki> Hi What's the difference between the to cache-size settings here? I've not been able to find a good description to guide me in finding the right values. mount-point / cache-size 10000 1. server foo:9080 storage main name zeostorage var $INSTANCE/var cache-size 20MB 2. As far as I've been able to determine, the second one 2. refers to a separate cache at the zeo connection level. Running 9 zeo clients (2.7.9) like this on a frontend with 4G ram, varnish, apache, and haproxy. Tethering on the edge of too much swapping. Needing to cut down.. Would it be better to spend all the memory on 1? Is there a good way to find a balance? Regards Gaute Amundsen From tseaver at palladion.com Wed Jan 6 03:57:45 2010 From: tseaver at palladion.com (Tres Seaver) Date: Wed, 06 Jan 2010 03:57:45 -0500 Subject: [Zope] zeo cache-size tuning - number of obj. vs MB In-Reply-To: <1262767317.28850.375.camel@totiki> References: <1262767317.28850.375.camel@totiki> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Gaute Amundsen wrote: > Hi > > What's the difference between the to cache-size settings here? > I've not been able to find a good description to guide me in finding the > right values. > > > mount-point / > cache-size 10000 1. > > server foo:9080 > storage main > name zeostorage > var $INSTANCE/var > cache-size 20MB 2. > > > > As far as I've been able to determine, the second one 2. refers to a > separate cache at the zeo connection level. The ZEO client cache is a disk-based cache, separate from the RAM-based cache used by any ZODB connection. It doesn't use RAM, per se, except for an in-memory index of OID -> (layer, offset). > Running 9 zeo clients (2.7.9) like this on a frontend with 4G ram, > varnish, apache, and haproxy. Tethering on the edge of too much > swapping. Needing to cut down.. Assuming you are running with the default number of "worker threads" (4): 10000 objects in the cache * 4 active connections per appserver * 9 appservers means you are caching 360,000 objects in RAM. If they are putting you into swap, then you are averaging something like 10Kb per object, which is pretty big. > Would it be better to spend all the memory on 1? > Is there a good way to find a balance? I think I might cut down on the number of appservers on that host, if it truly is hitting swap. Or trim the number of threads per appserver down from 4 to 2 or 3. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktEUIQACgkQ+gerLs4ltQ6pYwCfX4g/ZVfAnyJNQ4Y1njnSx1HV 6QEAnAg/UHsCEQSx6rUpj5K9X2JkoGdQ =7ya0 -----END PGP SIGNATURE----- From gaute at div.org Wed Jan 6 06:41:13 2010 From: gaute at div.org (Gaute Amundsen) Date: Wed, 06 Jan 2010 12:41:13 +0100 Subject: [Zope] zeo cache-size tuning - number of obj. vs MB In-Reply-To: References: <1262767317.28850.375.camel@totiki> Message-ID: <1262778073.28850.426.camel@totiki> On Wed, 2010-01-06 at 03:57 -0500, Tres Seaver wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Gaute Amundsen wrote: > > Hi > > > > What's the difference between the to cache-size settings here? > > I've not been able to find a good description to guide me in finding the > > right values. > > > > > > mount-point / > > cache-size 10000 1. > > > > server foo:9080 > > storage main > > name zeostorage > > var $INSTANCE/var > > cache-size 20MB 2. > > > > > > > > As far as I've been able to determine, the second one 2. refers to a > > separate cache at the zeo connection level. > > The ZEO client cache is a disk-based cache, separate from the RAM-based > cache used by any ZODB connection. It doesn't use RAM, per se, except > for an in-memory index of OID -> (layer, offset). What would happen if set too small or too large? > > Running 9 zeo clients (2.7.9) like this on a frontend with 4G ram, > > varnish, apache, and haproxy. Tethering on the edge of too much > > swapping. Needing to cut down.. > > Assuming you are running with the default number of "worker threads" > (4): 10000 objects in the cache * 4 active connections per appserver * > 9 appservers means you are caching 360,000 objects in RAM. If they are > putting you into swap, then you are averaging something like 10Kb per > object, which is pretty big. Sorry, forgot to mention: 1 thread per appserver. Otherwise there's not much use in haproxy's load balancing we figured. Meory usage as reported by munin is avg. 160M, max ~220M and backend loads/stores are about 1000/10 a minute avg. and iowait at 45% avg today. committed memory 3.7G avg. This little oneliner for summing VSZ: ps auxf | grep zope | awk '{total+=$5} END{print total}' reports: 1918552 for zope 1489768 for varnish 2270732 for www-data And for RSS 1375908 zope 177200 varnsih 374624 www-data in addition to the 9, that includes one appserver with 6 therads/60000 obs and one with 1 therad/20000 for developers and robots respectively. > > Would it be better to spend all the memory on 1? > > Is there a good way to find a balance? > > I think I might cut down on the number of appservers on that host, if it > truly is hitting swap. Or trim the number of threads per appserver down > from 4 to 2 or 3. Problem is we run out of them way to often now, and get 503's from haproxy. I just added another 3 in fact.. Perhaps I'll try with 6 tomorrow.. Thanks :) Gaute From tseaver at palladion.com Wed Jan 6 15:01:51 2010 From: tseaver at palladion.com (Tres Seaver) Date: Wed, 06 Jan 2010 15:01:51 -0500 Subject: [Zope] zeo cache-size tuning - number of obj. vs MB In-Reply-To: <1262778073.28850.426.camel@totiki> References: <1262767317.28850.375.camel@totiki> <1262778073.28850.426.camel@totiki> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Gaute Amundsen wrote: > On Wed, 2010-01-06 at 03:57 -0500, Tres Seaver wrote: >> The ZEO client cache is a disk-based cache, separate from the RAM-based >> cache used by any ZODB connection. It doesn't use RAM, per se, except >> for an in-memory index of OID -> (layer, offset). > > What would happen if set too small or too large? If it is too small, your app will have to go across the net too often to fetch an object's state from the ZEO server. If it is too large, then recovering after the client disconnects from the ZEO server can take a very long time. >> Assuming you are running with the default number of "worker threads" >> (4): 10000 objects in the cache * 4 active connections per appserver * >> 9 appservers means you are caching 360,000 objects in RAM. If they are >> putting you into swap, then you are averaging something like 10Kb per >> object, which is pretty big. > > Sorry, forgot to mention: 1 thread per appserver. > Otherwise there's not much use in haproxy's load balancing we figured. I would probably test that assumption. One rule of thumb I use is one appserver process per CPU, and then tune number of threads / connection cache size until the machine stays just out of swap. > Meory usage as reported by munin is avg. 160M, max ~220M > and backend loads/stores are about 1000/10 a minute avg. > and iowait at 45% avg today. > committed memory 3.7G avg. > > This little oneliner for summing VSZ: > ps auxf | grep zope | awk '{total+=$5} END{print total}' > reports: > 1918552 for zope > 1489768 for varnish > 2270732 for www-data > > And for RSS > 1375908 zope > 177200 varnsih > 374624 www-data > > > in addition to the 9, that includes one appserver with 6 therads/60000 > obs and one with 1 therad/20000 for developers and robots respectively. Nothing jumps out at me: I might look at pushing varnish or apache off onto another machine, maybe. >> I think I might cut down on the number of appservers on that host, if it >> truly is hitting swap. Or trim the number of threads per appserver down >> from 4 to 2 or 3. > > Problem is we run out of them way to often now, and get 503's from > haproxy. I just added another 3 in fact.. > > Perhaps I'll try with 6 tomorrow.. If your proxy is timing you out, then maybe you need to look at more hardware, or elas spend some time profiling the application and trimming out unnecessary work there. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktE7C8ACgkQ+gerLs4ltQ74QgCffLc5emNAK7l22qbdGDQgagVv UnkAoMFwNe4cnO1grPe6x6aHt6WgdRNt =sRPq -----END PGP SIGNATURE----- From brinegar at ecn.purdue.edu Thu Jan 7 14:21:14 2010 From: brinegar at ecn.purdue.edu (Brian Brinegar) Date: Thu, 07 Jan 2010 14:21:14 -0500 Subject: [Zope] Error in Copy/Import during Migration Message-ID: <4B46342A.20305@ecn.purdue.edu> I'm fairly well versed on the inner workings of Zope, but yesterday I've run into a problem that I can grasp. First, some background on what I'm doing. I've got a 200GB Data.fs file which I'm splitting up into multiple storages. The way I'm doing this is to create a zope instance which mounts a new storage and the old storage and then a python script connects to the application and uses a modified version of manage_clone (which maintains ownership) to copy content into the new storage. This works correctly for most things, but yesterday I tried to move a folder with about 3.1GB of stuff in it. On a side note, I ran into an issue with running out of /tmp space during the clone. The _getCopy method of CopySourse exports an object to a tempfile and then imports it to create the copy. When copying something larger than available tmp space zope crashes. I worked around this by explicitly setting tempfile.tempdir to somewhere with plenty of free space. There may be an environment variable to do this as well. Just an FYI. Anyway, here's what I see. The copy starts, a tempfile is created (on the client) and grows to the appropriate size (3.1GB). Then, a Data.fs.temp appears on the new server and grows to the appropriate size. However, when my script tries to commit the transaction I get an EOF error: Traceback (most recent call last): File "./migrate_site.py", line 45, in ? transaction.get().commit() File "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", line 325, in commit self._commitResources() File "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", line 427, in _commitResources rm.tpc_vote(self) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZODB/Connection.py", line 744, in tpc_vote s = vote(transaction) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZEO/ClientStorage.py", line 1004, in tpc_vote self._server.vote(id(txn)) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZEO/ServerStub.py", line 262, in vote return self.rpc.call('vote', trans_id) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZEO/zrpc/connection.py", line 699, in call raise inst # error raised by server EOFError I don't seem to have any space issues on any devices, and the process works for smaller site. Any input would be greatly appreciated. Thanks, -- Brian Brinegar Web Services Coordinator Engineering Computer Network From akm at theinternet.com.au Thu Jan 7 14:30:21 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Fri, 8 Jan 2010 06:30:21 +1100 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <4B46342A.20305@ecn.purdue.edu> References: <4B46342A.20305@ecn.purdue.edu> Message-ID: <20100107193021.GN81608@camelot.theinternet.com.au> +-------[ Brian Brinegar ]---------------------- | I'm fairly well versed on the inner workings of Zope, but yesterday I've | run into a problem that I can grasp. [snip] | Anyway, here's what I see. The copy starts, a tempfile is created (on | the client) and grows to the appropriate size (3.1GB). Then, a | Data.fs.temp appears on the new server and grows to the appropriate | size. However, when my script tries to commit the transaction I get an | EOF error: File size limits on the new server restricting to say 2GB? -- Andrew Milton akm at theinternet.com.au From cnd at ecn.purdue.edu Thu Jan 7 14:33:46 2010 From: cnd at ecn.purdue.edu (Christopher N. Deckard) Date: Thu, 07 Jan 2010 14:33:46 -0500 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <20100107193021.GN81608@camelot.theinternet.com.au> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> Message-ID: <4B46371A.1050504@ecn.purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/7/10 2:30 PM, Andrew Milton wrote: > +-------[ Brian Brinegar ]---------------------- > | I'm fairly well versed on the inner workings of Zope, but yesterday I've > | run into a problem that I can grasp. > > [snip] > > | Anyway, here's what I see. The copy starts, a tempfile is created (on > | the client) and grows to the appropriate size (3.1GB). Then, a > | Data.fs.temp appears on the new server and grows to the appropriate > | size. However, when my script tries to commit the transaction I get an > | EOF error: > > File size limits on the new server restricting to say 2GB? No. It's an x86-64 RedHat 5 install. We've had 250GB files on this system. - -Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.12 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktGNxoACgkQ+zGkEDwn8Uam5QCcDOe62Znr9CrfuwpvCPXXCW0T oKEAoMjde1r8SKzdv38UTbf6ozaAeNWE =O65C -----END PGP SIGNATURE----- From akm at theinternet.com.au Thu Jan 7 14:39:47 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Fri, 8 Jan 2010 06:39:47 +1100 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <4B46371A.1050504@ecn.purdue.edu> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> Message-ID: <20100107193947.GO81608@camelot.theinternet.com.au> +-------[ Christopher N. Deckard ]---------------------- | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | On 1/7/10 2:30 PM, Andrew Milton wrote: | > +-------[ Brian Brinegar ]---------------------- | > | I'm fairly well versed on the inner workings of Zope, but yesterday I've | > | run into a problem that I can grasp. | > | > [snip] | > | > | Anyway, here's what I see. The copy starts, a tempfile is created (on | > | the client) and grows to the appropriate size (3.1GB). Then, a | > | Data.fs.temp appears on the new server and grows to the appropriate | > | size. However, when my script tries to commit the transaction I get an | > | EOF error: | > | > File size limits on the new server restricting to say 2GB? | | No. It's an x86-64 RedHat 5 install. We've had 250GB files on this system. Got any errors in your ZEO log ? -- Andrew Milton akm at theinternet.com.au From akm at theinternet.com.au Thu Jan 7 14:42:30 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Fri, 8 Jan 2010 06:42:30 +1100 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <4B46371A.1050504@ecn.purdue.edu> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> Message-ID: <20100107194230.GP81608@camelot.theinternet.com.au> +-------[ Christopher N. Deckard ]---------------------- | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | On 1/7/10 2:30 PM, Andrew Milton wrote: | > +-------[ Brian Brinegar ]---------------------- | > | I'm fairly well versed on the inner workings of Zope, but yesterday I've | > | run into a problem that I can grasp. | > | > [snip] | > | > | Anyway, here's what I see. The copy starts, a tempfile is created (on | > | the client) and grows to the appropriate size (3.1GB). Then, a | > | Data.fs.temp appears on the new server and grows to the appropriate | > | size. However, when my script tries to commit the transaction I get an | > | EOF error: | > | > File size limits on the new server restricting to say 2GB? | | No. It's an x86-64 RedHat 5 install. We've had 250GB files on this system. Also have you done a cmp(1) of the chunk and the data.fs.tmp file to make sure you're not just seeing a sparse file of the right size that's internally truncated? -- Andrew Milton akm at theinternet.com.au From cnd at ecn.purdue.edu Thu Jan 7 15:07:02 2010 From: cnd at ecn.purdue.edu (Christopher N. Deckard) Date: Thu, 07 Jan 2010 15:07:02 -0500 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <20100107193947.GO81608@camelot.theinternet.com.au> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> <20100107193947.GO81608@camelot.theinternet.com.au> Message-ID: <4B463EE6.8070905@ecn.purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/7/10 2:39 PM, Andrew Milton wrote: > +-------[ Christopher N. Deckard ]---------------------- > | -----BEGIN PGP SIGNED MESSAGE----- > | Hash: SHA1 > | > | On 1/7/10 2:30 PM, Andrew Milton wrote: > | > +-------[ Brian Brinegar ]---------------------- > | > | I'm fairly well versed on the inner workings of Zope, but yesterday I've > | > | run into a problem that I can grasp. > | > > | > [snip] > | > > | > | Anyway, here's what I see. The copy starts, a tempfile is created (on > | > | the client) and grows to the appropriate size (3.1GB). Then, a > | > | Data.fs.temp appears on the new server and grows to the appropriate > | > | size. However, when my script tries to commit the transaction I get an > | > | EOF error: > | > > | > File size limits on the new server restricting to say 2GB? > | > | No. It's an x86-64 RedHat 5 install. We've had 250GB files on this system. > > Got any errors in your ZEO log ? Aha! Our zeo log shows that we are running out of space in /tmp. What is the best way to redefine the location for temp files for the ZEO server? - -Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.12 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktGPuYACgkQ+zGkEDwn8UbojQCglylx+tFbmuALBmEK7dFXACRK 6BcAoMooVxYsbfSCwRjUbV3VDAyqfYMn =XHFb -----END PGP SIGNATURE----- From akm at theinternet.com.au Thu Jan 7 15:10:24 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Fri, 8 Jan 2010 07:10:24 +1100 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <4B463EE6.8070905@ecn.purdue.edu> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> <20100107193947.GO81608@camelot.theinternet.com.au> <4B463EE6.8070905@ecn.purdue.edu> Message-ID: <20100107201024.GQ81608@camelot.theinternet.com.au> +-------[ Christopher N. Deckard ]---------------------- | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | On 1/7/10 2:39 PM, Andrew Milton wrote: | > +-------[ Christopher N. Deckard ]---------------------- | > | -----BEGIN PGP SIGNED MESSAGE----- | > | Hash: SHA1 | > | | > | On 1/7/10 2:30 PM, Andrew Milton wrote: | > | > +-------[ Brian Brinegar ]---------------------- | > | > | I'm fairly well versed on the inner workings of Zope, but yesterday I've | > | > | run into a problem that I can grasp. | > | > | > | > [snip] | > | > | > | > | Anyway, here's what I see. The copy starts, a tempfile is created (on | > | > | the client) and grows to the appropriate size (3.1GB). Then, a | > | > | Data.fs.temp appears on the new server and grows to the appropriate | > | > | size. However, when my script tries to commit the transaction I get an | > | > | EOF error: | > | > | > | > File size limits on the new server restricting to say 2GB? | > | | > | No. It's an x86-64 RedHat 5 install. We've had 250GB files on this system. | > | > Got any errors in your ZEO log ? | | Aha! Our zeo log shows that we are running out of space in /tmp. What | is the best way to redefine the location for temp files for the ZEO server? Set the TMPDIR env var to point to where you want tmp files created in the shell script that starts your ZEO server -- Andrew Milton akm at theinternet.com.au From cnd at ecn.purdue.edu Thu Jan 7 15:46:20 2010 From: cnd at ecn.purdue.edu (Christopher N. Deckard) Date: Thu, 07 Jan 2010 15:46:20 -0500 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <20100107201024.GQ81608@camelot.theinternet.com.au> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> <20100107193947.GO81608@camelot.theinternet.com.au> <4B463EE6.8070905@ecn.purdue.edu> <20100107201024.GQ81608@camelot.theinternet.com.au> Message-ID: <4B46481C.2040107@ecn.purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/7/10 3:10 PM, Andrew Milton wrote: > Set the TMPDIR env var to point to where you want tmp files created in > the shell script that starts your ZEO server > We got our tmpdir issues worked out, but then got this error: 2010-01-07 15:40:34 CRITICAL txn.47988082355376 A storage error occurred during the second phase of the two-phase commit. Resources may be in an inconsistent state. Traceback (most recent call last): File "./migrate_site.py", line 45, in ? transaction.get().commit() File "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", line 325, in commit self._commitResources() File "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", line 432, in _commitResources rm.tpc_finish(self) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZODB/Connection.py", line 758, in tpc_finish self._storage.tpc_finish(transaction, callback) File "/var/local/zope/Zope-2.11.4-1/lib/python/ZEO/ClientStorage.py", line 1079, in tpc_finish raise ClientDisconnected( ZEO.Exceptions.ClientDisconnected: Calling tpc_finish() on a disconnected transaction - -Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.12 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktGSBwACgkQ+zGkEDwn8UY/TwCggnFf2KLjId+J/wI4LIESuuM+ b1wAoKz8p/JpbA/WOQHZQ3fgMyglmpaE =zKI2 -----END PGP SIGNATURE----- From tseaver at palladion.com Thu Jan 7 16:00:35 2010 From: tseaver at palladion.com (Tres Seaver) Date: Thu, 07 Jan 2010 16:00:35 -0500 Subject: [Zope] Error in Copy/Import during Migration In-Reply-To: <4B46481C.2040107@ecn.purdue.edu> References: <4B46342A.20305@ecn.purdue.edu> <20100107193021.GN81608@camelot.theinternet.com.au> <4B46371A.1050504@ecn.purdue.edu> <20100107193947.GO81608@camelot.theinternet.com.au> <4B463EE6.8070905@ecn.purdue.edu> <20100107201024.GQ81608@camelot.theinternet.com.au> <4B46481C.2040107@ecn.purdue.edu> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christopher N. Deckard wrote: > On 1/7/10 3:10 PM, Andrew Milton wrote: > >> Set the TMPDIR env var to point to where you want tmp files created in >> the shell script that starts your ZEO server > > > We got our tmpdir issues worked out, but then got this error: > > 2010-01-07 15:40:34 CRITICAL txn.47988082355376 A storage error occurred > during the second phase of the two-phase commit. Resources may be in an > inconsistent state. > Traceback (most recent call last): > File "./migrate_site.py", line 45, in ? > transaction.get().commit() > File > "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", > line 325, in commit > self._commitResources() > File > "/var/local/zope/Zope-2.11.4-1/lib/python/transaction/_transaction.py", > line 432, in _commitResources > rm.tpc_finish(self) > File "/var/local/zope/Zope-2.11.4-1/lib/python/ZODB/Connection.py", > line 758, in tpc_finish > self._storage.tpc_finish(transaction, callback) > File "/var/local/zope/Zope-2.11.4-1/lib/python/ZEO/ClientStorage.py", > line 1079, in tpc_finish > raise ClientDisconnected( > ZEO.Exceptions.ClientDisconnected: Calling tpc_finish() on a > disconnected transaction Try restarting the appservers after the restart of the ZEO server. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS3IACgkQ+gerLs4ltQ5vyQCdHUGdM13eHGh0YFibqovvxuPu rIsAmgL02kC/XczD59oGhyY8pDhicByN =+owh -----END PGP SIGNATURE----- From binbrain at gmail.com Fri Jan 8 11:08:15 2010 From: binbrain at gmail.com (Jim Pharis) Date: Fri, 8 Jan 2010 11:08:15 -0500 Subject: [Zope] Five EditFrom and Fields appears broken Message-ID: <77f231801001080808q4f07ab8bp40900740ccb6319f@mail.gmail.com> Does anyone successfully use zope.formlib.form Fields with Products.Five.formlib.formbase EditForm? I was trying to figure out why my form_fields.omit and custom_widget were being ignored. I followed it up the stack and found the method setUpEditWidgets in zope.app.form.utility never takes Fields into account and just looks at the schema and context to determine the fields. So I was starting to think maybe you don't use Fields with Five forms, but there is a unit test in Products.Five.formlib.tests view.py that actually thinks its using Fields. I don't think this is actually the case though, the test just doesn't touch omit or custom_widget functionality so it passes thinking Fields is working. The /Products/Five/form/__init__.py imports zope.app.form.utility setUpEditWidgets. zope.formlib has a different setUpEditWidgets method in zope/formlib/form.py that actually takes form_fields as the 1st param. So in summary, if you think your using Fields in Five try using omit or custom_widget and see if it works and you actually are really using Fields. If it works maybe I have something messed up on my end. TIA - Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20100108/862250a9/attachment.html From tseaver at palladion.com Tue Jan 12 22:23:22 2010 From: tseaver at palladion.com (Tres Seaver) Date: Tue, 12 Jan 2010 22:23:22 -0500 Subject: [Zope] New Zope2 releases available Message-ID: <4B4D3CAA.7080004@palladion.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In order to address a potential cross-site scripting problem in Zope's fallback error message, we are releasing new versions of the 2.8, 2.9, 2.10, 2.11, and 2.12 release lines. The issue, reported by the Plone team, could be triggered by a combination of a broken 'standard_error_message' template, plus an error whose 'str' contained markup. Although the 2.8, 2.9, and 2.10 branches are formally "out-of- maintenance", they are still in very wide use. the Zope security response team decided to release versions for those branches, in addition to the 2.11 and 2.12 branches which are still being supported under normal policy. Releases are available here: - - "Zope 2.8.12", http://www.zope.org/Products/Zope/2.8.12 - - "Zope 2.9.12", http://www.zope.org/Products/Zope/2.9.12 - - "Zope 2.10.11", http://www.zope.org/Products/Zope/2.10.22 - - "Zope 2.11.6", http://www.zope.org/Products/Zope/2.11.6 - - "Zope 2.12.3", http://pypi.zope.org/pypi/Zope2/2.12.3 Please note that the 2.12 releases are made only on the Python Package Index server, aka "PyPI" or "the Cheeseshop." Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktNPJYACgkQ+gerLs4ltQ6P1QCeJk6B+kIz9tXmN2oGYxFh1HuT WTIAoKevoMU9XOLmTJgpiRuLk7dHZnZv =PrpY -----END PGP SIGNATURE----- From encolpe.degoute at quadra-informatique.fr Wed Jan 13 05:33:07 2010 From: encolpe.degoute at quadra-informatique.fr (Encolpe Degoute) Date: Wed, 13 Jan 2010 11:33:07 +0100 Subject: [Zope] New Zope2 releases available In-Reply-To: <4B4D3CAA.7080004__11685.5557695546$1263353040$gmane$org@palladion.com> References: <4B4D3CAA.7080004__11685.5557695546$1263353040$gmane$org@palladion.com> Message-ID: Tres Seaver a ?crit : [...] > > - "Zope 2.10.11", > http://www.zope.org/Products/Zope/2.10.22 short typo : - "Zope 2.10.11", http://www.zope.org/Products/Zope/2.10.11 -- Encolpe Degoute <encolpe.degoute at quadra-informatique.fr> From encolpe.degoute at quadra-informatique.fr Mon Jan 18 10:14:08 2010 From: encolpe.degoute at quadra-informatique.fr (Encolpe Degoute) Date: Mon, 18 Jan 2010 16:14:08 +0100 Subject: [Zope] Product loading during ZopeTestCase startup Message-ID: Hello, since few days i'am facing a strange problem with egg loading in tests. One egg called project.site_policy is never loaded in the Products namespace: the ZopeLite.hasPackage('project.site_policy') always returns False. Where is the code that loads eggs and products outside SOFTWARE_HOME/lib/python/Products ? regards -- "...[Linux] peut communiquer ? travers n'importe quel medium except? les signaux de fum?e." -+- Dr. Greg Wettstein, Roger Maris Cancer Center -+- From me at rpatterson.net Mon Jan 18 23:52:04 2010 From: me at rpatterson.net (Ross Patterson) Date: Mon, 18 Jan 2010 20:52:04 -0800 Subject: [Zope] Product loading during ZopeTestCase startup References: Message-ID: <87my0apuh7.fsf@transitory.lefae.org> Encolpe Degoute writes: > Hello, > since few days i'am facing a strange problem with egg loading in tests. > One egg called project.site_policy is never loaded in the Products > namespace: the ZopeLite.hasPackage('project.site_policy') always returns > False. > Where is the code that loads eggs and products outside > SOFTWARE_HOME/lib/python/Products ? > > regards If I'm understanding correctly, one need to use the five:registerPackage ZCML directive and then use ZTC.installPackage. Many collective.* packages can be used as reference, including collective.formcriteria. There are probably simper examples, but that's the first that comes to mind. HTH, Ross From encolpe.degoute at quadra-informatique.fr Tue Jan 19 02:40:56 2010 From: encolpe.degoute at quadra-informatique.fr (Encolpe Degoute) Date: Tue, 19 Jan 2010 08:40:56 +0100 Subject: [Zope] Product loading during ZopeTestCase startup In-Reply-To: <87my0apuh7.fsf@transitory.lefae.org> References: <87my0apuh7.fsf@transitory.lefae.org> Message-ID: Ross Patterson a ?crit : > Encolpe Degoute > > writes: > >> Hello, >> since few days i'am facing a strange problem with egg loading in tests. >> One egg called project.site_policy is never loaded in the Products >> namespace: the ZopeLite.hasPackage('project.site_policy') always returns >> False. >> Where is the code that loads eggs and products outside >> SOFTWARE_HOME/lib/python/Products ? >> >> regards > > If I'm understanding correctly, one need to use the five:registerPackage > ZCML directive and then use ZTC.installPackage. Many collective.* > packages can be used as reference, including collective.formcriteria. > There are probably simper examples, but that's the first that comes to > mind. I finally found it. My colleague create an egg without five:registerPackage and it was working for times in production... but not if you run unittests. Thanks, Encolpe DEGOUTE From garry at schoolteachers.co.uk Tue Jan 19 13:28:03 2010 From: garry at schoolteachers.co.uk (Garry Saddington) Date: Tue, 19 Jan 2010 18:28:03 +0000 Subject: [Zope] python help needed Message-ID: <4B55F9B3.8010001@schoolteachers.co.uk> I am trying to upload a csv file (called data) using the following script: i=0 d=data.readlines() for row in d: i+=1 a=row.split(',') if i > 1: subjectid=a[0] entry=a[1] type=a[2] studentid=a[3] try: context.insertestimatesandtargets(subjectid=subjectid,entry=entry,type=type,studentid=studentid) except: continue return "something good" (email editor messed up indentation) insertestimatesandtargets() is a ZSQLmethod. When the call to this method results in an error the script stops and not all data is inserted. Without an error all the data is inserted. So how can I make this script skip over errors and continue? The reason is that there may already be some data in the database table that I want to preserve. regards Garry From akm at theinternet.com.au Tue Jan 19 14:59:21 2010 From: akm at theinternet.com.au (Andrew Milton) Date: Wed, 20 Jan 2010 06:59:21 +1100 Subject: [Zope] python help needed In-Reply-To: <4B55F9B3.8010001@schoolteachers.co.uk> References: <4B55F9B3.8010001@schoolteachers.co.uk> Message-ID: <20100119195921.GL81608@camelot.theinternet.com.au> +-------[ Garry Saddington ]---------------------- | I am trying to upload a csv file (called data) using the following script: | | i=0 | d=data.readlines() | for row in d: | i+=1 | a=row.split(',') | if i > 1: | subjectid=a[0] | entry=a[1] | type=a[2] | studentid=a[3] | try: | | | context.insertestimatesandtargets(subjectid=subjectid,entry=entry,type=type,studentid=studentid) | except: | continue | return "something good" | | (email editor messed up indentation) | | insertestimatesandtargets() is a ZSQLmethod. When the call to this | method results in an error the script stops and not all data is | inserted. Without an error all the data is inserted. | So how can I make this script skip over errors and continue? The reason | is that there may already be some data in the database table that I want | to preserve. The try/except block should prevent the script from failing when calling the ZSQL method (assuming your indenting *is* correct in the python script [look for mixed tabs/spaces, since in the email some of your indents are 8 and some are 4]). Your other option is to do transaction sub-commits manually (there's plenty of google links for how to do this). You probably can't do this directly from a python script, you'll have to setup an External Method to do it (or alter the security for the transaction machinery). -- Andrew Milton akm at theinternet.com.au From garry at schoolteachers.co.uk Tue Jan 19 15:10:56 2010 From: garry at schoolteachers.co.uk (Garry Saddington) Date: Tue, 19 Jan 2010 20:10:56 +0000 Subject: [Zope] python help needed In-Reply-To: <20100119195921.GL81608@camelot.theinternet.com.au> References: <4B55F9B3.8010001@schoolteachers.co.uk> <20100119195921.GL81608@camelot.theinternet.com.au> Message-ID: <4B5611D0.20906@schoolteachers.co.uk> Andrew Milton wrote: > +-------[ Garry Saddington ]---------------------- > | I am trying to upload a csv file (called data) using the following script: > | > | i=0 > | d=data.readlines() > | for row in d: > | i+=1 > | a=row.split(',') > | if i > 1: > | subjectid=a[0] > | entry=a[1] > | type=a[2] > | studentid=a[3] > | try: > | > | > | context.insertestimatesandtargets(subjectid=subjectid,entry=entry,type=type,studentid=studentid) > | except: > | continue > | return "something good" > | > | (email editor messed up indentation) > | > | insertestimatesandtargets() is a ZSQLmethod. When the call to this > | method results in an error the script stops and not all data is > | inserted. Without an error all the data is inserted. > | So how can I make this script skip over errors and continue? The reason > | is that there may already be some data in the database table that I want > | to preserve. > > The try/except block should prevent the script from failing when calling > the ZSQL method (assuming your indenting *is* correct in the python > script [look for mixed tabs/spaces, since in the email some of your > indents are 8 and some are 4]). No all correct - Thunderbird not allowing me to edit the text. > > Your other option is to do transaction sub-commits manually (there's > plenty of google links for how to do this). > > You probably can't do this directly from a python script, you'll have to > setup an External Method to do it (or alter the security for the > transaction machinery). > Yes, thanks I thought that was the problem. I've already sorted it with external methods. Garry From tseaver at palladion.com Fri Jan 22 12:16:21 2010 From: tseaver at palladion.com (Tres Seaver) Date: Fri, 22 Jan 2010 12:16:21 -0500 Subject: [Zope] [ZF] Announcement: 2010 Zope Foundation Board Elections and General Meeting Message-ID: <4B59DD65.1080604@palladion.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 (apologies in advance for the cross-post: we need this to reach the whole Zope community). The Zope Foundation board is pleased to announce the regular 2010 general meeting of the foundation will be held on Wednesday, 24 February 2010, at 17:00 UTC. The meeting will be conducted via IRC at the following channel: irc://irc.freenode.net/#zope-foundation Prior to that meeting, the current board will conduct an elections in which foundation members will select seven (7) board members in accordance with the foundation bylaws[1]. Summary - ------- - - Nominations open via the foundation at zope.org mailing list until Friday, 2010-01-29. - - Voting via e-mail to a closed mailing list, from Wednesday, 2010-02-03 through Friday, 2010-02-19. - - Votes tallied by representatives of the current board, using "Meek and Warrent STV" method using OpenSTV software. - - General meeting and seating of the new board, Wednesday, 2010-02-24. Procedure for Elections - ----------------------- The procedure for the elections is as follows: - - Foundation members may nominate any member by responding to the board's announcment on the foundation at zope.org maling list. Nominations will remain open until Friday, 2010-01-29, 23:00 UTC. - - At the close of the nominations period, the board will create a new mailman list, 'zf-elections-2010', and approve all ZF members to post to the list.. In order to preserve anonymity of votes, foundation members will not be subscribers to the list; access to the list archives will be restricted to the "tellers" appointed by the board. - - On Wednesday, 2010-02-03, the Secretary will send an e-mail announcing the opening of the voting period. This email will contain the ballot, with careful instructions about how to rank preferences in the reply. The Reply-to header of this e-mail will be set to the 'zf-elections-2010' list. - - ZF members will vote by replying to that e-mail. Voting will remain open until Friday, 2010-02-19, 23:00 UTC. - - At the close of voting, the board will appoint two of its members as "tellers." The tellers will use the list archive to tabulate the members' votes, using the OpenSTV application[2] configured to use the Meek and Warren STV method[3]. The tellers will report the election results, along with the raw tallies, at a special board meeting to be held on Tuesday, 2009-02-23, 15:00 UTC. - - After canvassing the results from the tellers, the board will notify all nominees of the success / failure of their candidacy, thanking them for their willingness to serve. - - At the general meeting, the last item on the agenda will the announcement of the election results, including a vote to "seat" the board. An online version of this announcement is available at: http://foundation.zope.org/news/2010_election_and_general_meeting/ References - ---------- [1] http://foundation.zope.org/bylaws/zope_foundation_bylaws.pdf [2] http://stv.sourceforge.net/aboutopenstv [3] http://stv.sourceforge.net/votingmethods/meek Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktZ3V8ACgkQ+gerLs4ltQ6sDQCfbV+M85FnxeiSypdy0WBHle1A 7+sAn2aZoP5pb0sqK4ir84d9rhm09HiO =urx1 -----END PGP SIGNATURE----- From chrism at plope.com Fri Jan 22 14:11:09 2010 From: chrism at plope.com (Chris McDonough) Date: Fri, 22 Jan 2010 14:11:09 -0500 Subject: [Zope] [ZF] Announcement: 2010 Zope Foundation Board Elections and General Meeting In-Reply-To: <4B59DD65.1080604@palladion.com> References: <4B59DD65.1080604@palladion.com> Message-ID: <4B59F84D.8000405@plope.com> I nominate Tres Seaver. - C Tres Seaver wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > (apologies in advance for the cross-post: we need this to reach the > whole Zope community). > > The Zope Foundation board is pleased to announce the regular 2010 > general meeting of the foundation will be held on Wednesday, 24 February > 2010, at 17:00 UTC. The meeting will be conducted via IRC at the > following channel: > > irc://irc.freenode.net/#zope-foundation > > Prior to that meeting, the current board will conduct an elections in > which foundation members will select seven (7) board members in > accordance with the foundation bylaws[1]. > > > Summary > - ------- > > - - Nominations open via the foundation at zope.org mailing list until > Friday, 2010-01-29. > > - - Voting via e-mail to a closed mailing list, from Wednesday, > 2010-02-03 through Friday, 2010-02-19. > > - - Votes tallied by representatives of the current board, > using "Meek and Warrent STV" method using OpenSTV software. > > - - General meeting and seating of the new board, Wednesday, 2010-02-24. > > > Procedure for Elections > - ----------------------- > > The procedure for the elections is as follows: > > - - Foundation members may nominate any member by responding to the > board's announcment on the foundation at zope.org maling list. > Nominations will remain open until Friday, 2010-01-29, 23:00 UTC. > > - - At the close of the nominations period, the board will create a new > mailman list, 'zf-elections-2010', and approve all ZF members to post > to the list.. In order to preserve anonymity of votes, foundation > members will not be subscribers to the list; access to the list > archives will be restricted to the "tellers" appointed by the board. > > - - On Wednesday, 2010-02-03, the Secretary will send an e-mail announcing > the opening of the voting period. This email will contain the ballot, > with careful instructions about how to rank preferences in the reply. > The Reply-to header of this e-mail will be set to the > 'zf-elections-2010' list. > > - - ZF members will vote by replying to that e-mail. Voting will remain > open until Friday, 2010-02-19, 23:00 UTC. > > - - At the close of voting, the board will appoint two of its members as > "tellers." The tellers will use the list archive to tabulate the > members' votes, using the OpenSTV application[2] configured to use the > Meek and Warren STV method[3]. The tellers will report the election > results, along with the raw tallies, at a special board meeting to be > held on Tuesday, 2009-02-23, 15:00 UTC. > > - - After canvassing the results from the tellers, the board will notify > all nominees of the success / failure of their candidacy, thanking > them for their willingness to serve. > > - - At the general meeting, the last item on the agenda will the > announcement of the election results, including a vote to "seat" the > board. > > > An online version of this announcement is available at: > > http://foundation.zope.org/news/2010_election_and_general_meeting/ > > > References > - ---------- > > [1] http://foundation.zope.org/bylaws/zope_foundation_bylaws.pdf > > [2] http://stv.sourceforge.net/aboutopenstv > > [3] http://stv.sourceforge.net/votingmethods/meek > > > > > Tres. > - -- > =================================================================== > Tres Seaver +1 540-429-0999 tseaver at palladion.com > Palladion Software "Excellence by Design" http://palladion.com > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktZ3V8ACgkQ+gerLs4ltQ6sDQCfbV+M85FnxeiSypdy0WBHle1A > 7+sAn2aZoP5pb0sqK4ir84d9rhm09HiO > =urx1 > -----END PGP SIGNATURE----- > _______________________________________________ > foundation mailing list > foundation at zope.org > https://mail.zope.org/mailman/listinfo/foundation > From chrism at plope.com Fri Jan 22 14:13:49 2010 From: chrism at plope.com (Chris McDonough) Date: Fri, 22 Jan 2010 14:13:49 -0500 Subject: [Zope] [Zope-dev] [ZF] Announcement: 2010 Zope Foundation Board Elections and General Meeting In-Reply-To: <4B59F84D.8000405@plope.com> References: <4B59DD65.1080604@palladion.com> <4B59F84D.8000405@plope.com> Message-ID: <4B59F8ED.9050901@plope.com> Gah, sorry for the multilist cross-post, this should have gone to the foundation list only. - C Chris McDonough wrote: > I nominate Tres Seaver. > > - C > > Tres Seaver wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> (apologies in advance for the cross-post: we need this to reach the >> whole Zope community). >> >> The Zope Foundation board is pleased to announce the regular 2010 >> general meeting of the foundation will be held on Wednesday, 24 February >> 2010, at 17:00 UTC. The meeting will be conducted via IRC at the >> following channel: >> >> irc://irc.freenode.net/#zope-foundation >> >> Prior to that meeting, the current board will conduct an elections in >> which foundation members will select seven (7) board members in >> accordance with the foundation bylaws[1]. >> >> >> Summary >> - ------- >> >> - - Nominations open via the foundation at zope.org mailing list until >> Friday, 2010-01-29. >> >> - - Voting via e-mail to a closed mailing list, from Wednesday, >> 2010-02-03 through Friday, 2010-02-19. >> >> - - Votes tallied by representatives of the current board, >> using "Meek and Warrent STV" method using OpenSTV software. >> >> - - General meeting and seating of the new board, Wednesday, 2010-02-24. >> >> >> Procedure for Elections >> - ----------------------- >> >> The procedure for the elections is as follows: >> >> - - Foundation members may nominate any member by responding to the >> board's announcment on the foundation at zope.org maling list. >> Nominations will remain open until Friday, 2010-01-29, 23:00 UTC. >> >> - - At the close of the nominations period, the board will create a new >> mailman list, 'zf-elections-2010', and approve all ZF members to post >> to the list.. In order to preserve anonymity of votes, foundation >> members will not be subscribers to the list; access to the list >> archives will be restricted to the "tellers" appointed by the board. >> >> - - On Wednesday, 2010-02-03, the Secretary will send an e-mail announcing >> the opening of the voting period. This email will contain the ballot, >> with careful instructions about how to rank preferences in the reply. >> The Reply-to header of this e-mail will be set to the >> 'zf-elections-2010' list. >> >> - - ZF members will vote by replying to that e-mail. Voting will remain >> open until Friday, 2010-02-19, 23:00 UTC. >> >> - - At the close of voting, the board will appoint two of its members as >> "tellers." The tellers will use the list archive to tabulate the >> members' votes, using the OpenSTV application[2] configured to use the >> Meek and Warren STV method[3]. The tellers will report the election >> results, along with the raw tallies, at a special board meeting to be >> held on Tuesday, 2009-02-23, 15:00 UTC. >> >> - - After canvassing the results from the tellers, the board will notify >> all nominees of the success / failure of their candidacy, thanking >> them for their willingness to serve. >> >> - - At the general meeting, the last item on the agenda will the >> announcement of the election results, including a vote to "seat" the >> board. >> >> >> An online version of this announcement is available at: >> >> http://foundation.zope.org/news/2010_election_and_general_meeting/ >> >> >> References >> - ---------- >> >> [1] http://foundation.zope.org/bylaws/zope_foundation_bylaws.pdf >> >> [2] http://stv.sourceforge.net/aboutopenstv >> >> [3] http://stv.sourceforge.net/votingmethods/meek >> >> >> >> >> Tres. >> - -- >> =================================================================== >> Tres Seaver +1 540-429-0999 tseaver at palladion.com >> Palladion Software "Excellence by Design" http://palladion.com >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.9 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iEYEARECAAYFAktZ3V8ACgkQ+gerLs4ltQ6sDQCfbV+M85FnxeiSypdy0WBHle1A >> 7+sAn2aZoP5pb0sqK4ir84d9rhm09HiO >> =urx1 >> -----END PGP SIGNATURE----- >> _______________________________________________ >> foundation mailing list >> foundation at zope.org >> https://mail.zope.org/mailman/listinfo/foundation >> > > _______________________________________________ > Zope-Dev maillist - Zope-Dev at zope.org > https://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope ) > From kiorky at cryptelium.net Fri Jan 22 16:28:54 2010 From: kiorky at cryptelium.net (kiorky) Date: Fri, 22 Jan 2010 22:28:54 +0100 Subject: [Zope] Very odd reverse proxy problem . [nginx -> win32 zope] Message-ID: <4B5A1896.4000307@cryptelium.net> The things: * I have a nginx handmade compiled under the hood * I have an official zope+plone installation on native windows * I have a django based application inside the cygwin * I have a tomcat+cas installation on native windows All of that seem to be configured correctly. What i want to do is to make my nginx a reverse proxy of the 3 others applications. Because of some other application needs (wsgi served with flup/socket) i need that nginx to live inside the cygwin installation. That's not my concern afterall :). The nginx works well for static contents and as the the django and tomcat installations reverse proxy. Here come problems with zope+plone. If i hit my http://url/plone (nginx mapped point to the plone install as http reverse proxy), the first request (get /) pass, but the other stall as 206 partial content and are very long to be satisfied. The browser seems to be blocked on some read() call. I tried a bunch of things nginx side (use epoll, use select, tweak proxy parameters, stop proxy buffering, set timeouts, set retrys and so on) but i have not found the right configuration if it is there. But where it is very strange is that if i make an ssh tunnel from localhost:80 to prod_machine:localhost:80, then make some entry into my /etc/hosts to fake the dns name. Then browse to http://myurl/plone, no problem, i have the content, and all http request are satisfied (js & co.). I really don't know how to debug that, can it be because the request enter from cygwin, go out to windows re enter cygwin and go for the client? The fact that throught the ssh tunnel, when i hit the nginx server on my plone install (like "as normal", i dont hit plone but nginx) work perfectly lives me without words. Other strange thing is that the CAS application, also http reverse proxified work like a charm. Other thing is that if i use the windows nginx binary from nginx website, with equal configuration, it works. The only thing is nginx running out of cygwin stack and compiled for win32. If someone has some suggestions .... -- Cordialement, KiOrKY GPG Key FingerPrint: 0x1A1194B7681112AF -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature Url : http://mail.zope.org/pipermail/zope/attachments/20100122/976f9fdb/attachment.bin From mbaiju at zeomega.com Wed Jan 27 07:57:41 2010 From: mbaiju at zeomega.com (Baiju M) Date: Wed, 27 Jan 2010 18:27:41 +0530 Subject: [Zope] Cann't we use 'get' as object name in Zope 2.12 ? Message-ID: Hi, Any idea about this ? >>> app.manage_addFolder('get') Traceback (most recent call last): File "", line 1, in File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/Folder.py", line 51, in manage_addFolder self._setObject(id, ob) File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/ObjectManager.py", line 332, in _setObject v = self._checkId(id) File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/ObjectManager.py", line 116, in checkValidId 'The id "%s" is invalid - it is already in use.' % id) zExceptions.BadRequest: The id "get" is invalid - it is already in use. Regards, Baiju M From lists at zopyx.com Wed Jan 27 07:59:37 2010 From: lists at zopyx.com (Andreas Jung) Date: Wed, 27 Jan 2010 13:59:37 +0100 Subject: [Zope] Cann't we use 'get' as object name in Zope 2.12 ? In-Reply-To: References: Message-ID: <4B6038B9.8090602@zopyx.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Baiju M wrote: > Hi, > Any idea about this ? I think there is a filter checking for names that could lead to name clashes through acquisition. - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktgOLgACgkQCJIWIbr9KYxfEgCgk7EP28cvFQro2nS6IcC/BqTl 0wgAnAqJ9FnvwLyT3gqlxLdpTWwfm5/3 =s5EM -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: lists.vcf Type: text/x-vcard Size: 316 bytes Desc: not available Url : http://mail.zope.org/pipermail/zope/attachments/20100127/6c62b31a/attachment.vcf From tseaver at palladion.com Wed Jan 27 15:56:11 2010 From: tseaver at palladion.com (Tres Seaver) Date: Wed, 27 Jan 2010 15:56:11 -0500 Subject: [Zope] Cann't we use 'get' as object name in Zope 2.12 ? In-Reply-To: References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Baiju M wrote: > Hi, > Any idea about this ? > >>>> app.manage_addFolder('get') > Traceback (most recent call last): > File "", line 1, in > File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/Folder.py", > line 51, in manage_addFolder > self._setObject(id, ob) > File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/ObjectManager.py", > line 332, in _setObject > v = self._checkId(id) > File "/opt/baiju/zesite/eggs/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/ObjectManager.py", > line 116, in checkValidId > 'The id "%s" is invalid - it is already in use.' % id) > zExceptions.BadRequest: The id "get" is invalid - it is already in use. Because attributes and item keys are in the same namespace, you cannot use any attribute name the object has as a key for a subobject. This includes methods defined on the object's class, but not acquired methods / attributes. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktgqGcACgkQ+gerLs4ltQ5B3QCgvc3CpAg/VFrjoqKVc8RlaQWl jzQAoMvKzZGfJ6MjFSgGhTIUxcJApD9X =XGMH -----END PGP SIGNATURE----- From john at eco-living.net Wed Jan 27 16:06:11 2010 From: john at eco-living.net (John Schinnerer) Date: Wed, 27 Jan 2010 11:06:11 -1000 Subject: [Zope] Safe way to abort or re-start stalled out ZODB pack? Message-ID: <4B60AAC3.10104@eco-living.net> Hello, This is for Zope 2.9.8-final, python 2.4.4, linux2 (debian) (installed by the Plone 2.5.5 installer if that matters, and using zeoserver) I have a ZODB pack operation started via the ZMI control panel that has failed to complete. It appears to be from a disk space issue (traceback below). The zope instance is still working fine on the pre-pack ZODB, and, there is a Data.fs.pack file sitting in ../zeocluster/server/var which hasn't been modified in the last ten hours. I need to know how to deal with this situation safely - how to abort and/or safely re-start the pack (the disk space issue has been dealt with). Some questions that have come to mind are: Is it safe to just restart zope? Will that clear the stalled pack operation automagically? Will I need to do something manually with the Data.fs.pack file? Any assistance appreciated...! thanks, John S. Traceback: --------------------- 2010-01-27T03:51:09 INFO ZEO.zrpc.Connection(S) (127.0.0.1:35831) vote() raised exception: [Errno 28] No space left on device Traceback (most recent call last): File "/opt/Plone-2.5.5/lib/python/ZEO/zrpc/connection.py", line 421, in handle_request ret = meth(*args) File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 465, in vote return self._wait(lambda: self._vote()) File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 583, in _wait return self._restart() File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 599, in _restart resp = self._thunk() File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 465, in return self._wait(lambda: self._vote()) File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 539, in _vote return self.storage.tpc_vote(self.transaction) File "/opt/Plone-2.5.5/lib/python/ZODB/FileStorage/FileStorage.py", line 891, in tpc_vote self._file.flush() IOError: [Errno 28] No space left on device --------------------------- -- John Schinnerer - M.A., Whole Systems Design -------------------------------------------- - Eco-Living - Whole Systems Design Services People - Place - Learning - Integration john at eco-living.net http://eco-living.net From john at eco-living.net Wed Jan 27 23:12:20 2010 From: john at eco-living.net (John Schinnerer) Date: Wed, 27 Jan 2010 18:12:20 -1000 Subject: [Zope] Safe way to abort or re-start stalled out ZODB pack? In-Reply-To: <9284028b1001271735m42d3a159o60fb271c963e6d22@mail.gmail.com> References: <4B60AAC3.10104@eco-living.net> <9284028b1001271735m42d3a159o60fb271c963e6d22@mail.gmail.com> Message-ID: <4B610EA4.9000608@eco-living.net> Thanks Bakhtiar, That's what I was hoping, and I wanted some confirmation from those who've done it. I just did as you indicated - deleted Data.fs.pack, then ran the pack again. It completed successfully. regards, John S. Bakhtiar A Hamid wrote: > On Thu, Jan 28, 2010 at 5:06 AM, John Schinnerer wrote: >> Hello, >> >> This is for >> >> Zope 2.9.8-final, python 2.4.4, linux2 (debian) >> (installed by the Plone 2.5.5 installer if that matters, and using >> zeoserver) >> >> I have a ZODB pack operation started via the ZMI control panel that has >> failed to complete. It appears to be from a disk space issue (traceback >> below). >> >> The zope instance is still working fine on the pre-pack ZODB, and, there >> is a Data.fs.pack file sitting in ../zeocluster/server/var which hasn't >> been modified in the last ten hours. > > > Hi > > we've had the same issue (on an old setup with limited disk space) and > removing Data.fs.pack should suffice. > > We just repack after deleting. > > you can copy Data.fs if you want to. > > hth >> I need to know how to deal with this situation safely - how to abort >> and/or safely re-start the pack (the disk space issue has been dealt with). >> Some questions that have come to mind are: >> Is it safe to just restart zope? >> Will that clear the stalled pack operation automagically? >> Will I need to do something manually with the Data.fs.pack file? >> >> Any assistance appreciated...! >> thanks, >> John S. >> >> Traceback: >> --------------------- >> 2010-01-27T03:51:09 INFO ZEO.zrpc.Connection(S) (127.0.0.1:35831) vote() >> raised exception: [Errno 28] No space left on device >> Traceback (most recent call last): >> File "/opt/Plone-2.5.5/lib/python/ZEO/zrpc/connection.py", line 421, >> in handle_request >> ret = meth(*args) >> File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 465, in >> vote >> return self._wait(lambda: self._vote()) >> File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 583, in >> _wait >> return self._restart() >> File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 599, in >> _restart >> resp = self._thunk() >> File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 465, in >> >> return self._wait(lambda: self._vote()) >> File "/opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py", line 539, in >> _vote >> return self.storage.tpc_vote(self.transaction) >> File "/opt/Plone-2.5.5/lib/python/ZODB/FileStorage/FileStorage.py", >> line 891, in tpc_vote >> self._file.flush() >> IOError: [Errno 28] No space left on device >> --------------------------- >> >> -- >> John Schinnerer - M.A., Whole Systems Design >> -------------------------------------------- >> - Eco-Living - >> Whole Systems Design Services >> People - Place - Learning - Integration >> john at eco-living.net >> http://eco-living.net >> _______________________________________________ >> Zope maillist - Zope at zope.org >> https://mail.zope.org/mailman/listinfo/zope >> ** No cross posts or HTML encoding! ** >> (Related lists - >> https://mail.zope.org/mailman/listinfo/zope-announce >> https://mail.zope.org/mailman/listinfo/zope-dev ) >> > -- John Schinnerer - M.A., Whole Systems Design -------------------------------------------- - Eco-Living - Whole Systems Design Services People - Place - Learning - Integration john at eco-living.net http://eco-living.net From rover at menttes.com Thu Jan 28 02:40:35 2010 From: rover at menttes.com (Roberto Allende) Date: Thu, 28 Jan 2010 04:40:35 -0300 Subject: [Zope] using formlib for nonclasic content types Message-ID: Hello Following example 18.3.1 and 18.3.2 from phillkon's book, i'm trying to define a MySite class in Zope 2.12, which look like this: class IMySite(IPossibleSite, IContainer): """ """ id = ASCIILine( ... name = TextLine( ... class MySite(SiteManagerContainer, BTreeContainer): implements(IMySite) So far so good, i've an interface and a class extending SiteManagerContainer and BTreeContainer. Problem becomes when i want to define the add form. If i'm not wrong, I cannot use the same machinery as zope3, so i was trying to use formlib: class MySiteAddForm(AddForm): form_fields=form.Fields(IListo) And i doesn't work. The error i'm getting is: NotImplementedError: concrete classes must implement create() or createAndAdd() I was looking info about them but i wonder i'm running with a conceptual gap here, because this is the same problem i had to define MySite inheriting from Folder. The same problem happened there, i was able to define the class but when i needed the form i wasn't able to use formlib and i used old-zope2-like-code. Probably i could try to do smt like that, but i'm very curious to see how can i use formlib in such cases. The question then is, is it possible or would it make sense to do something like this ?. Do you know about a sample code that could be helpful ?. Any comment or hint would be very appreciated. Kind Regards r. -- http://robertoallende.com From lists at zopyx.com Thu Jan 28 09:10:27 2010 From: lists at zopyx.com (Andreas Jung) Date: Thu, 28 Jan 2010 15:10:27 +0100 Subject: [Zope] [Zope-Annce] [ZF] Announcement: 2010 Zope Foundation Board Elections and General Meeting In-Reply-To: <4B59DD65.1080604@palladion.com> References: <4B59DD65.1080604@palladion.com> Message-ID: <4B619AD3.7080305@zopyx.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tres Seaver wrote: > > > > Procedure for Elections ----------------------- > > The procedure for the elections is as follows: > > - Foundation members may nominate any member by responding to the > board's announcment on the foundation at zope.org maling list. > Nominations will remain open until Friday, 2010-01-29, 23:00 UTC. I nominate: - - Lennart Regebro Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkthmtMACgkQCJIWIbr9KYyQywCg6a/TkNCXjlqS/MNS6IT+KHLs w4YAnjUVVEKfdR/NL1yjkvL2BY/YEJtS =tfgo -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: lists.vcf Type: text/x-vcard Size: 316 bytes Desc: not available Url : http://mail.zope.org/pipermail/zope/attachments/20100128/a9399551/attachment.vcf From binbrain at gmail.com Thu Jan 28 14:41:18 2010 From: binbrain at gmail.com (Jim Pharis) Date: Thu, 28 Jan 2010 14:41:18 -0500 Subject: [Zope] using formlib for nonclasic content types In-Reply-To: References: Message-ID: <77f231801001281141l1c98b021h2e8e7a55fe320d33@mail.gmail.com> I went through the same motions as you in Zope2.12 trying to use Phillkon's book as a guide. I think I ran into the same problem as you. The key is in the package five.localsitemanager. My Site Interface is nothing. class IMySite(Interface): """My Site"" In my site.py I have the following. ... from five.localsitemanager import make_objectmanager_site ... class MySite(Folder): implements(IMySite) def __init__(self, id): setHooks() Folder.__init__(self, id='Mine') make_objectmanager_site(self) <----- key to making a OFS folder a site setSite(self) notify(NewMySiteEvent(self) After that you can treat your MySite OFS Folder like a site. Register utilities with it, setHooks, and setSite. Hope this helps, - Jim On Thu, Jan 28, 2010 at 2:40 AM, Roberto Allende wrote: > Hello > > Following example 18.3.1 and 18.3.2 from phillkon's book, i'm trying to > define a MySite class in Zope 2.12, which look like this: > > > class IMySite(IPossibleSite, IContainer): > """ > """ > id = ASCIILine( ... > name = TextLine( ... > > > class MySite(SiteManagerContainer, BTreeContainer): > implements(IMySite) > > So far so good, i've an interface and a class extending > SiteManagerContainer and BTreeContainer. Problem becomes when i want to > define the add form. If i'm not wrong, I cannot use the same machinery > as zope3, so i was trying to use formlib: > > class MySiteAddForm(AddForm): > form_fields=form.Fields(IListo) > > And i doesn't work. The error i'm getting is: > > NotImplementedError: concrete classes must implement create() or > createAndAdd() > > I was looking info about them but i wonder i'm running with a conceptual > gap here, because this is the same problem i had to define MySite > inheriting from Folder. The same problem happened there, i was able to > define the class but when i needed the form i wasn't able to use formlib > and i used old-zope2-like-code. Probably i could try to do smt like > that, but i'm very curious to see how can i use formlib in such cases. > > The question then is, is it possible or would it make sense to do > something like this ?. Do you know about a sample code that could be > helpful ?. > > Any comment or hint would be very appreciated. > > Kind Regards > r. > > -- > http://robertoallende.com > > _______________________________________________ > Zope maillist - Zope at zope.org > https://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope-dev ) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20100128/4e3e3517/attachment.html From vavvav at mykniga.de Fri Jan 29 04:44:20 2010 From: vavvav at mykniga.de (Vladislav Vorobiev) Date: Fri, 29 Jan 2010 10:44:20 +0100 Subject: [Zope] Save references in a list as object attribut Message-ID: <4B62ADF4.6090708@mykniga.de> Hello, I try to save references to objects as attribute in a list. object.refList=getattr([self. context.pfad, 'object'], [self.context.pfad, 'object1']) After adding and transaction commit I can get my linked objects with all attributes and methods myObject.refList [] myObject.refList[0].objectValues()[0].getPhysicalPath() ('', 'path', 'object') myObject.refList[0].objectValues()[0].absolute_url() http://localhost/pfad/object I restart the instance and get some other results myObject.refList [] myObject.refList[0].objectValues()[0].getPhysicalPath() ('object',) myObject.refList[0].objectValues()[0].absolute_url() 'object' It seems that the in list referenced object ist no more in context after restart. the constructor for this looks like: object = myObject() id=myObject myObject.id = id myObject.title= id myObject.refList=getattr([self.context.pfad, 'object'], [self.context.pfad, 'object1']) self.context._setObject(id, ob) The references without list object.ref=objectreference working after restart. Similar conducts Set und PersistentList. Whats the problem anybody an idea? Can anybody reproduce the problem? Zope2.12, python2.6 -- Best Regards Vlad Vorobiev From thierry.florac at onf.fr Fri Jan 29 06:31:13 2010 From: thierry.florac at onf.fr (Thierry Florac) Date: Fri, 29 Jan 2010 12:31:13 +0100 Subject: [Zope] Save references in a list as object attribut In-Reply-To: <4B62ADF4.6090708@mykniga.de> References: <4B62ADF4.6090708@mykniga.de> Message-ID: <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> Le vendredi 29 janvier 2010, Vladislav Vorobiev a ?crit : ====================================================================== > I try to save references to objects as attribute in a list. > > object.refList=getattr([self. > context.pfad, 'object'], > [self.context.pfad, 'object1']) > > After adding and transaction commit I can get my linked objects with > all attributes and methods > > myObject.refList > [] > > myObject.refList[0].objectValues()[0].getPhysicalPath() > ('', 'path', 'object') > > myObject.refList[0].objectValues()[0].absolute_url() > http://localhost/pfad/object > > I restart the instance and get some other results > > myObject.refList > [] > > myObject.refList[0].objectValues()[0].getPhysicalPath() > ('object',) > > myObject.refList[0].objectValues()[0].absolute_url() > 'object' > > It seems that the in list referenced object ist no more in context > after restart. > > the constructor for this looks like: > > object = myObject() > id=myObject > myObject.id = id > myObject.title= id > myObject.refList=getattr([self.context.pfad, 'object'], > [self.context.pfad, 'object1']) > self.context._setObject(id, ob) ====================================================================== Modifying an object's list attribute "in place" doesn't mark the persistent object as modified ; so as soon as the object is removed from the cache, it's modifications are lost. You should probably : - use persistent lists (persistent.list.PersistentList) instead of "basic" lists - mark object as modified manually (myObject._p_changed = True) - or change value of object list attribute : myList = myObject.refList myList[0] = ... myObject.refList = myList Hope this helps, Thierry -- Chef de projets intranet/internet Office National des For?ts - D?partement Informatique 2, Avenue de Saint-Mand? 75570 Paris Cedex 12 T?l. : 01 40 19 59 64 Fax. : 01 40 19 58 85 M?l. : thierry.florac at onf.fr Web. : http://www.onf.fr From vavvav at mykniga.de Fri Jan 29 10:23:03 2010 From: vavvav at mykniga.de (Vladislav Vorobiev) Date: Fri, 29 Jan 2010 16:23:03 +0100 Subject: [Zope] Save references in a list as object attribut In-Reply-To: <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> References: <4B62ADF4.6090708@mykniga.de> <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> Message-ID: <4B62FD57.4030400@mykniga.de> Thierry Florac wrote: > Le vendredi 29 janvier 2010, > Vladislav Vorobiev a ?crit : > ====================================================================== > >> I try to save references to objects as attribute in a list. >> >> object.refList=getattr([self. >> context.pfad, 'object'], >> [self.context.pfad, 'object1']) >> >> After adding and transaction commit I can get my linked objects with >> all attributes and methods >> >> myObject.refList >> [] >> >> myObject.refList[0].objectValues()[0].getPhysicalPath() >> ('', 'path', 'object') >> >> myObject.refList[0].objectValues()[0].absolute_url() >> http://localhost/pfad/object >> >> I restart the instance and get some other results >> >> myObject.refList >> [] >> >> myObject.refList[0].objectValues()[0].getPhysicalPath() >> ('object',) >> >> myObject.refList[0].objectValues()[0].absolute_url() >> 'object' >> >> It seems that the in list referenced object ist no more in context >> after restart. >> >> the constructor for this looks like: >> >> object = myObject() >> id=myObject >> myObject.id = id >> myObject.title= id >> myObject.refList=getattr([self.context.pfad, 'object'], >> [self.context.pfad, 'object1']) >> self.context._setObject(id, ob) >> > ====================================================================== > > Modifying an object's list attribute "in place" doesn't mark the > persistent object as modified ; so as soon as the object is removed from > the cache, it's modifications are lost. > > You should probably : > - use persistent lists (persistent.list.PersistentList) instead of > "basic" lists > - mark object as modified manually (myObject._p_changed = True) > - or change value of object list attribute : > myList = myObject.refList > myList[0] = ... > myObject.refList = myList > > Hope this helps, > Thierry > Thierry thank you for answer but it doesn't help. I implement all what you sad. I tried with normal ?list? and than swiched to ?PersistentList? code looks like that : from persistent.list import PersistentList import transaction myList=PersistentList([self.context.pfad, 'object]) myList[0] = PersistentList([self.context.pfad, 'object])[0] #hope I anderstud you right ob.refList= myList ob._p_changed = True ob.refList._p_changed = True self.context._setObject(id, ob) After add I call again: ob._p_changed = True ob.refList._p_changed = True transaction.commit() I see the commitet trunsactions in ZMI The same problem. After restart ist the Attribut not in context. For example return's Before restart: ***1 ob.refList[0].objectValues()[0].absolute_url() /pfad/object/FirstObjectOfReferencedObject After restart only the id of the object: ob.refList[0].objectValues()[0].absolute_url() FirstObjectOfReferencedObject Here is a place for an other question: Normaly self.absolute_url() returns url with hostname, (http://localhost/bla/bla) but already befor restart I get without http://localhost/... see ***1 It seem's that I forgot something. *I* would be *glad* to if somebody explain me this problem. Best regards Vladislav From vavvav at mykniga.de Fri Jan 29 10:25:52 2010 From: vavvav at mykniga.de (Vladislav Vorobiev) Date: Fri, 29 Jan 2010 16:25:52 +0100 Subject: [Zope] Save references in a list as object attribut In-Reply-To: <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> References: <4B62ADF4.6090708@mykniga.de> <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> Message-ID: <4B62FE00.5030900@mykniga.de> Thierry Florac wrote: > Le vendredi 29 janvier 2010, > Vladislav Vorobiev a ?crit : > ====================================================================== > >> I try to save references to objects as attribute in a list. >> >> object.refList=getattr([self. >> context.pfad, 'object'], >> [self.context.pfad, 'object1']) >> >> After adding and transaction commit I can get my linked objects with >> all attributes and methods >> >> myObject.refList >> [] >> >> myObject.refList[0].objectValues()[0].getPhysicalPath() >> ('', 'path', 'object') >> >> myObject.refList[0].objectValues()[0].absolute_url() >> http://localhost/pfad/object >> >> I restart the instance and get some other results >> >> myObject.refList >> [] >> >> myObject.refList[0].objectValues()[0].getPhysicalPath() >> ('object',) >> >> myObject.refList[0].objectValues()[0].absolute_url() >> 'object' >> >> It seems that the in list referenced object ist no more in context >> after restart. >> >> the constructor for this looks like: >> >> object = myObject() >> id=myObject >> myObject.id = id >> myObject.title= id >> myObject.refList=getattr([self.context.pfad, 'object'], >> [self.context.pfad, 'object1']) >> self.context._setObject(id, ob) >> > ====================================================================== > > Modifying an object's list attribute "in place" doesn't mark the > persistent object as modified ; so as soon as the object is removed from > the cache, it's modifications are lost. > > You should probably : > - use persistent lists (persistent.list.PersistentList) instead of > "basic" lists > - mark object as modified manually (myObject._p_changed = True) > - or change value of object list attribute : > myList = myObject.refList > myList[0] = ... > myObject.refList = myList > > Hope this helps, > Thierry > Thierry thank you for answer but it doesn't help. I implement all what you sad. I tried with normal ?list? and than swiched to ?PersistentList? code looks like that: from persistent.list import PersistentList import transaction myList=PersistentList([self.context.pfad, 'object]) myList[0] = PersistentList([self.context.pfad, 'object])[0] #hope I anderstud you right ob.refList= myList ob._p_changed = True ob.refList._p_changed = True self.context._setObject(id, ob) After add I call again: ob._p_changed = True ob.refList._p_changed = True transaction.commit() I see the commitet trunsactions in ZMI The same problem. After restart ist the Attribut not in context. For example return's Before restart: ***1 ob.refList[0].objectValues()[0].absolute_url() /pfad/object/FirstObjectOfReferencedObject After restart only the id of the object: ob.refList[0].objectValues()[0].absolute_url() FirstObjectOfReferencedObject Here is a place for an other question: Normaly self.absolute_url() returns url with hostname, (http://localhost/bla/bla) but already befor restart I get without http://localhost/... see ***1 It seem's that I forgot something. I would be glad to if somebody explain me this problem. Best regards Vladislav ps: sorry for unclean preview message :-) From vavvav at mykniga.de Sun Jan 31 11:57:12 2010 From: vavvav at mykniga.de (Vladislav Vorobiev) Date: Sun, 31 Jan 2010 17:57:12 +0100 Subject: [Zope] Save references in a list as object attribut In-Reply-To: <20100129171632.114a6e5a@m03089.branche00.arbre.foret.onf.fr> References: <4B62ADF4.6090708@mykniga.de> <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> <4B62FE00.5030900@mykniga.de> <20100129171632.114a6e5a@m03089.branche00.arbre.foret.onf.fr> Message-ID: <4B65B668.50004@mykniga.de> An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20100131/25b12c44/attachment.html From tseaver at palladion.com Sun Jan 31 18:01:03 2010 From: tseaver at palladion.com (Tres Seaver) Date: Sun, 31 Jan 2010 18:01:03 -0500 Subject: [Zope] Save references in a list as object attribut In-Reply-To: <4B65B668.50004@mykniga.de> References: <4B62ADF4.6090708@mykniga.de> <20100129123113.50528d64@m03089.branche00.arbre.foret.onf.fr> <4B62FE00.5030900@mykniga.de> <20100129171632.114a6e5a@m03089.branche00.arbre.foret.onf.fr> <4B65B668.50004@mykniga.de> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vladislav Vorobiev wrote: > Thierry Florac wrote: >> Le vendredi 29 janvier 2010, >> Vladislav Vorobiev a ?crit : >> ====================================================================== >> ... >> >> >>> Thierry thank you for answer but it doesn't help. >>> >>> I implement all what you sad. I tried with normal ?list? and than >>> swiched to ?PersistentList? >>> >>> code looks like that: >>> >>> from persistent.list import PersistentList >>> import transaction >>> >>> >>> >>> myList=PersistentList([self.context.pfad, 'object]) >>> myList[0] = PersistentList([self.context.pfad, 'object])[0] #hope I >>> anderstud you right >>> >>> ob.refList= myList >>> ob._p_changed = True >>> ob.refList._p_changed = True >>> self.context._setObject(id, ob) >>> >>> After add I call again: >>> >>> ob._p_changed = True >>> ob.refList._p_changed = True >>> transaction.commit() >>> >>> I see the commitet trunsactions in ZMI >>> >>> The same problem. After restart ist the Attribut not in context. >>> >>> For example return's >>> >>> Before restart: ***1 >>> ob.refList[0].objectValues()[0].absolute_url() >>> /pfad/object/FirstObjectOfReferencedObject >>> >>> After restart only the id of the object: >>> ob.refList[0].objectValues()[0].absolute_url() >>> FirstObjectOfReferencedObject >>> >>> Here is a place for an other question: >>> >>> Normaly self.absolute_url() returns url with hostname, >>> (http://localhost/bla/bla) >>> but already befor restart I get without http://localhost/... see ***1 >>> >>> It seem's that I forgot something. I would be glad to if somebody >>> explain me this problem. >>> >> ====================================================================== >> >> In fact I'm not really sure to understand your data structure and it's >> goals... >> Could you explain me what you want to do ?? >> >> Thierry >> > I want to set some references from object to another object through. I try to > explain this with example classes. > > Example with two classes: > > #Create classes > >>>class School: > >>> pass > > >>>class People: > >>> pass > > #Create objects > >>>p=People() > > >>>s0=School() > >>>s0.name="Konrad School" > > >>>s1=School > >>>s1.name="Leopold School" > > Now I set the referece > > >>>p.school1=s0 > >>>p.school2=s1 > > Now I can access through the attribut to s0 and s1 objects: > > p.school1.name > ?Konrad School? > > This construction works persistent without problems. > > The idea is to put the references in a list. > > >>>p.schools=[s0,s1] > > to access them > > >>>p.schools[0].name > ?Konrad School? > > >>>s1.name="Leo School" > >>>p.schools[1].name > ?Leo School? > > >>>type(p.schools[1]) > > > It works in zope without restart. If the server was restartet I get some > unwanted results. See my previews posts. > The same effects I get with PersistentLists... > > I hope it is more understandable. You can't expect to use a simple list as an attribute of a persistent object without taking special precautions. Either you have methods which mutate the list, and then set the '_p_changed' attribute to 1: def addSchool(self, school): self.schools.append(school) self._p_changed = 1 or re-assign the list attribute: def addSchool(self, school): schools = self.schools schools.append(school) self.schools = schools You shoule be able to use a PersistentList instead of a "plain" Python list to avoid the need for one of those two problems: from persistent.list import PersistentList ... class Person: def __init__(self): self.schools = PersistentList() Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktmC68ACgkQ+gerLs4ltQ7YwACgmVuBDXwBykODaN4oCavOYRAD E3MAn1QRQmlSWSnyFvahj8N9rk4+6eXJ =Vz6h -----END PGP SIGNATURE-----