Re: [Zope] Can't stop Zope, machine hanging
One and a half days later, I am again unable to stop, restart or kill Zope. My ISP host is making changes on their network and I believe the problem is with them. I am in a FreeBSD jail, sharing the machine with a DNS server. It's 3am over there, and I wish I could do something while waiting for them to wake up. Then, we need to find out what is causing this problem. Andreas, I figured out that the netstat -p option required a protocol argument. So, 'netstat -anp TCP' gives me a very long list of IPs trying to connect. It does not display the pid of the hanging process, maybe some other option would do, but the problem seems to be a python2.3 process stuck in STOP state. I can't kill it, and I can't even restart the machine with the shutdown command. Is there no alternative to physically restarting this machine? While we are stuck, is there anything I can do to diagnose the problem? Thanks, Ken --- Dieter Maurer <[EMAIL PROTECTED]> wrote: > Ken Ara wrote at 2006-9-2 23:43 -0700: > > ... > >I can't restart or stop Zope - > >'/usr/local/www/Zope/zope01/bin/zopectl stop' just > >produces '' for a long time - should I > wait? I > >was unable to kill one of the python2.3 processes, > and > >can't even reboot the machine, using 'shutdown -r > >now', as I have done previously in extremis. > > This indicates a severe problem with your operating > system > (or maybe your computer). > > There are situations where a press on the reset > button is > necessary. Looks like you are in such a situation... > > > > -- > Dieter > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] searching zope free hosting
Hi to all! I'm searching a zope free hosting to publish my homepage. Unfortunately freezope.org and objectis.net are unavailable. is there another service like these? Thanks in advance, Fabio -- Dott. Fabio Marcone 2T srl Telefono+39 - 0871- 540154 Fax +39 - 0871- 571594 Email [EMAIL PROTECTED] Indirizzo Viale B. Croce 573 66013 Chieti Scalo (CH) GNU/Linux registered user #400424 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
Ken Ara wrote: One and a half days later, I am again unable to stop, restart or kill Zope. My ISP host is making changes on their network and I believe the problem is with them. I am in a FreeBSD jail, sharing the machine with a DNS server. It's 3am over there, and I wish I could do something while waiting for them to wake up. Then, we need to find out what is causing this problem. Move hosters. FreeBSD for all its robustness is not something I'd recommend running Zope on... Is there no alternative to physically restarting this machine? While we are stuck, is there anything I can do to diagnose the problem? You may have more luck on a FreeBSD list... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TinyTablesPlus How To??
beno wrote: Strange. I have version 0.9 and I could not find it! So, I just now downloaded a new copy and untarred it and there it was. Must have gotten deleted somehow. You still alive? Damn... want some more rope? As for Dennis Allison's comment, of course, I just want to know about this feature so I can add it to my toolbox :) Don't bother with it, it is not what you want as a solution to any problem... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MailBoxer Problem Found...But Not Solved
beno wrote: Request URL http://202.71.106.119:7080/error_log/manage_workspace Exception Type Redirect Exception Value http://202.71.106.119:7080/error_log/manage_main Now, that error is definitely from the email I sent. Bull. Although I'd be amused to see how you figured that... Check the above urls, this is a request by you to Zope's ZMI that got redirected to the manage_main. In fact, it's you looking at the error log itself. *sigh* * I don't use Apache, That's because you're an idiot. I have half a mind just to hack your server to prove a point. Nice of you to tell the entire list the IP and port where it's running... and I'd rather not have to if I can get away with it. Just one more program to maintain. Ah, lazy AND stupid. You should become a politician. * I use Pound on my front end, Yes, that'd be the "stupid" coming out again. * As a result, if I want to send requests *directly* to Zope, I need to use the IP address. ...which really should be firewalled off for everything other than localhost. rejoice: "|smtp2zope.py http://202.71.106.119:7080/rejoice.2012.vi/rejoice/manage_mailboxer 2" Have you actually thought to check your qmail logs to see what it thinks is happening? Apparently, MailBoxer doesn't like that. Apparently, it wants a web address, like rejoice.2012.vi, in my case. But that won't get past Pound :( What do? Which file should I hack to get it to accept the IP address? The fact that MailBoxer wants to do an HTTP post like this to add a message is, quite frankly, scary and should make you run far away from it for starters. Of course, you could just use mailman, but hey, far be it for you to actually listen to the advice of anyone on the lists you keep pestering. Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MailBoxer Problem Found...But Not Solved
beno wrote: down. Frankly, I though (and still suspect) that the fact that the site 2012.vi:7080 doesn't resolve because of the Pound/Squid/Zope interface name resolution has fuckall to do with Pound, Squid or Zope. but 202.71.106.119:7080 does combined with the fact that I have to send 202.71.106.119 is an ip address, therefore no name resolution is necessary. with no luck. Where else should I be looking? If you removed your head from your arse you might see a lot more... *sigh* Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Change language with PTS
Peter Bengtsson wrote: I'm still a i18n newbie. Don't use PTS! Ideas? If you have a google, you'll see i've just recently done the language-selection-from-cookies dance in Zope 2 but using Zope 3's infinitely better translation machinery ;-) There's even a sx.translations package which will help with providing you with a list of languages to pick from... Lemme know if you want me to release it once you've had a read of the relevant threads... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] searching zope free hosting
Fabio Marcone wrote: I'm searching a zope free hosting to publish my homepage. Unfortunately freezope.org and objectis.net are unavailable. http://register.freezope.org/ looks like it's working to me... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Change language with PTS
On 9/5/06, Chris Withers <[EMAIL PROTECTED]> wrote: Peter Bengtsson wrote: > I'm still a i18n newbie. Don't use PTS! I'll try Localizer > Ideas? If you have a google, you'll see i've just recently done the language-selection-from-cookies dance in Zope 2 but using Zope 3's infinitely better translation machinery ;-) There's even a sx.translations package which will help with providing you with a list of languages to pick from... Lemme know if you want me to release it once you've had a read of the relevant threads... Does this work for Zope 2.8? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Help! I Screwed Up a Source File
Hi; I inherited this box so I don't know exactly how this file got built; however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this file: 278/lib/python/Zope/Startup/zeoctl which incorrectly reads like this: #!/bin/sh # ZEO instance control script # The following two lines are for chkconfig. On Red Hat Linux (and # some other systems), you can copy or symlink this script into # /etc/rc.d/init.d/ and then use chkconfig(8) to automatically start # ZEO at boot time. # chkconfig: 345 90 10 # description: start a ZEO server PYTHON="/usr/local/zope/py235/bin/python" ZODB3_HOME="/usr/local/zope/278/lib/python" CONFIG_FILE="/usr/local/zope/instance2/var/zeo/etc/zeo.conf" PYTHONPATH="$ZODB3_HOME" export PYTHONPATH ZEOCTL="$ZODB3_HOME/ZEO/zeoctl.py" exec "$PYTHON" "$ZEOCTL" -C "$CONFIG_FILE" ${1+"$@"} ~ Where can I grab a copy of the correct file? TIA, beno ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] searching zope free hosting
Chris Withers wrote: Fabio Marcone wrote: I'm searching a zope free hosting to publish my homepage. Unfortunately freezope.org and objectis.net are unavailable. http://register.freezope.org/ looks like it's working to me... Chris Thanks, within 2 days they accept or reject my subscription. Fabio -- Dott. Fabio Marcone 2T srl Telefono+39 - 0871- 540154 Fax +39 - 0871- 571594 Email [EMAIL PROTECTED] Indirizzo Viale B. Croce 573 66013 Chieti Scalo (CH) GNU/Linux registered user #400424 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
On Tuesday 05 September 2006 3:58 am, Chris Withers wrote: > Move hosters. FreeBSD for all its robustness is not something I'd > recommend running Zope on... Seriously? Why so? I've been running Zope exclusively on FreeBSD since 2001 without any known problems. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Hmm... Localizer or Localizer
What's going on here?? Which is which? http://www.ikaaro.org/localizer or http://www.j-david.net/software/localizer/ They're both zope products and both with the same name. Perhaps the author of the "deprecated" page could put a redirect or something to the new one. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Hmm... Localizer or Localizer
Peter Bengtsson wrote: What's going on here?? Which is which? http://www.ikaaro.org/localizer or http://www.j-david.net/software/localizer/ They're both zope products and both with the same name. Perhaps the author of the "deprecated" page could put a redirect or something to the new one. Do yourself a favour and do what ChrisW suggested: use Five's i18n machinery. Comes with Zope 2.9 included. For Zope 2.8, simply install Five 1.2. It's a no-brainer (isntalling Five 1.2). Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] request.locale - do we have this in 2.9.4?
Hi! I'm using Zope 2.9.4 with Five1.4 (linux box). I'm trying to use DateDisplayWidget (from /zope/app/form/browser/textwidgets.py) I get: *Error Type: AttributeError* *Error Value: locale ... Module Products.PageTemplates.Expressions, line 180, in _eval Module Products.PageTemplates.Expressions, line 85, in render Module zope.app.form.browser.textwidgets, line 538, in __call__ Module ZPublisher.HTTPRequest, line 1219, in __getattr__ Which is caused by this line: formatter = self.request.locale.dates.getFormatter( self._category, (self.displayStyle or None)) So is this something with my Zope that I don't have request.locale or is that a bug? -- Maciej Wisniowski * ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help! I Screwed Up a Source File
On 9/5/06, beno <[EMAIL PROTECTED]> wrote: I inherited this box so I don't know exactly how this file got built; however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this file: 278/lib/python/Zope/Startup/zeoctl Where can I grab a copy of the correct file? Download 2.7.8 from Zope.org and extract that one file? -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
On 9/5/06, Maciej Wisniowski <[EMAIL PROTECTED]> wrote: I'm using Zope 2.9.4 with Five1.4 (linux box). I'm trying to use DateDisplayWidget (from /zope/app/form/browser/textwidgets.py) [snip] So is this something with my Zope that I don't have request.locale or is that a bug? I'd say it's a bug. The Zope3 request has the locale attribute, but the Zope2 request implementation doesn't. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
> I'd say it's a bug. The Zope3 request has the locale attribute, but > the Zope2 request implementation doesn't. Yeah, I supposed that but was not sure. Thanks. I've submitted an issue: http://www.zope.org/Collectors/Zope/2184 -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
--On 5. September 2006 15:35:36 +0200 Maciej Wisniowski <[EMAIL PROTECTED]> wrote: > I'd say it's a bug. The Zope3 request has the locale attribute, but > the Zope2 request implementation doesn't. Yeah, I supposed that but was not sure. Thanks. I've submitted an issue: http://www.zope.org/Collectors/Zope/2184 That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker :-) -aj pgp9W8EwffH6b.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker :-) Why Zope 3? I'm using Zope 2.9.4. This code is ported directly form Zope 3 or what? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Hmm... Localizer or Localizer
On 9/5/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Peter Bengtsson wrote: > What's going on here?? Which is which? > > http://www.ikaaro.org/localizer > or > http://www.j-david.net/software/localizer/ > > They're both zope products and both with the same name. > Perhaps the author of the "deprecated" page could put a redirect or > something to the new one. Do yourself a favour and do what ChrisW suggested: use Five's i18n machinery. Comes with Zope 2.9 included. For Zope 2.8, simply install Five 1.2. It's a no-brainer (isntalling Five 1.2). But how do you use it? I installed Five 1.2.6 In my product's directory I created a configure.zcml that looks like this:: http://namespaces.zope.org/zope"; xmlns:browser="http://namespaces.zope.org/browser"; xmlns:i18n="http://namespaces.zope.org/i18n"; package="Products.RememberYourFriends"> Starts without errors. My ryf-sv.po file isn't automatically compiled to .mo and I tried changing the HTTP_ACCEPT_LANGUAGE variable but still just the old default English. Either I've missed something big and crucial or there's a bug in lack of errors or alerts. Pulling my hair :( Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
--On 5. September 2006 15:49:46 +0200 Maciej Wisniowski <[EMAIL PROTECTED]> wrote: That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker :-) Why Zope 3? I'm using Zope 2.9.4. This code is ported directly form Zope 3 or what? The REQUEST in Zope 2 never had a 'locale' attribute and Zope 2 does not claim to be compatible with every kind of Zope 3 infrastructure. If request.locale is a very important feature in the Zope 3 world, one might backport this somehow to Zope 2 (if it makes sense). I consider this a feature request but not as a bug. -aj pgpAtCJXDstOS.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Hmm... Localizer or Localizer
Peter Bengtsson wrote: But how do you use it? I installed Five 1.2.6 In my product's directory I created a configure.zcml that looks like this:: http://namespaces.zope.org/zope"; xmlns:browser="http://namespaces.zope.org/browser"; xmlns:i18n="http://namespaces.zope.org/i18n"; package="Products.RememberYourFriends"> Starts without errors. My ryf-sv.po file isn't automatically compiled to .mo Right. The Zope 3 machinery doesn't do that. Use msgfmt from the gettext utilities to compile catalogs. You're also using PTS's non-standard directory layout. The standard gettext layout is somedir/LC_MESSAGES//.mo. PTS supports this as well but Plone continues not to go standard here and set a bad example :( and I tried changing the HTTP_ACCEPT_LANGUAGE variable but still just the old default English. HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header (Accept-Language) that you really shouldn't modify. The request should be treated as read-only. To test languages, either write your own IUserPreferredLanguages adapter that returns the language you want or simply configure your browser to send a different Accept-Language header. In Firefox, you can simply do this by entering "about:config" in the URL bar and changing the setting of the intl.accept_languages variable (e.g. to "se, en"). Either I've missed something big and crucial or there's a bug in lack of errors or alerts. You simply didn't read Five/doc/i18n.txt (http://codespeak.net/z3/five/i18n.html). Googling "five i18n" gives you that as a first hit. "RTFM" is all I can say here. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
> I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug is that DateDisplayWidget in Zope2.9.4 uses request.locale which as you said is from Zope3 world. So, as far as I understand, reference to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it does... Do you mean it is correct?? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: request.locale - do we have this in 2.9.4?
Martijn Pieters wrote: On 9/5/06, Maciej Wisniowski <[EMAIL PROTECTED]> wrote: I'm using Zope 2.9.4 with Five1.4 (linux box). I'm trying to use DateDisplayWidget (from /zope/app/form/browser/textwidgets.py) [snip] So is this something with my Zope that I don't have request.locale or is that a bug? I'd say it's a bug. No it's not. The Zope3 request has the locale attribute, but the Zope2 request implementation doesn't. Right. Who ever said that the Zope 2 request is compatible with the Zope 3 request? We can't even just make the Zope 2 request have that attribute because of potential backward incompatibilities. Why? Because you can do request.locale in Zope 2 right now which is an equivalent spelling of request['locale'] (it looks up request variables). If existing applications use the attribute access instead of the item access (which should clearly be the preferred way, but there's lots of Zope 2 legacy), they would break because request.locale would now find something else. It's not a bug. It's Zope 2's obscenity with __getattr__ APIs instead of __getitem__ APIs that's preventing the harmonizing of the two implementations, that's all. Both the ObjectManager and the request are very good examples of how Zope 2 got this wrong, but Zope 3 got it right. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request.locale - do we have this in 2.9.4?
--On 5. September 2006 16:24:09 +0200 Maciej Wisniowski <[EMAIL PROTECTED]> wrote: > I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug is that DateDisplayWidget in Zope2.9.4 uses request.locale which as you said is from Zope3 world. So, as far as I understand, reference to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it does... Zope 2 does *not* contain a special or modified or adjusted Zope 3 code base. -aj pgpzG5SbyJs0A.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: request.locale - do we have this in 2.9.4?
Maciej Wisniowski wrote: > I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug There is no bug. is that DateDisplayWidget in Zope2.9.4 uses request.locale which as you said is from Zope3 world. So, as far as I understand, reference to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it does... Do you mean it is correct?? DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. At the current state, it can't implement the whole interface. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and numerous other places where request.locale is used). The problem's roots go deeper. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
On 9/5/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Maciej Wisniowski wrote: > > I consider this a feature request but not as a bug. > Ehm... I'm not sure whether we understand each other. > > I mean the bug There is no bug. Sure there is. The Five integration includes code that expects an IBrowserRequest. Either Zope2 should implement that correctly, or Five should not include that widget, or Five should register a widget that doesn't use request.locale. This should be at a minimum be named as a known issue. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. At the current state, it can't implement the whole interface. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and numerous other places where request.locale is used). The problem's roots go deeper. I just thought that if there is DateDisplayWidget class in Zope2.9.4 code then it may be used. It is a bit strange for me that Zope contains code that is unuseable. But ok, I'll use something different. -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Martijn Pieters wrote: On 9/5/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Maciej Wisniowski wrote: > > I consider this a feature request but not as a bug. > Ehm... I'm not sure whether we understand each other. > > I mean the bug There is no bug. Sure there is. It's an issue, not a bug. All things that use DateTimeWidget are simply not supported at this stage. The Five integration includes code that expects an IBrowserRequest. Either Zope2 should implement that correctly, or Five should not include that widget, It'd be really really hard not to ship individual components from Zope 3. or Five should register a widget that doesn't use request.locale. Patches are welcome :) This should be at a minimum be named as a known issue. Sure. I just named it :). Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
OK, once again, after many hours of costly down time, we have restarted our Zope machine. Chris, could state your reasons for recommending against FreeBSD? I have had no trouble in over five years that I can directly attribute to FreeBSD, but I am open-minded. That said, I don't mean to reopen the 'best os' debate. This time I am pretty convinced that our problem had to do with changes due to the physical move of some equipment and reconfiguration at the ISP. Of immediate concern to me is whether I can do anything to prevent this happening again. From time to time, my Zope hangs, usually because of an attack by a bad robot requesting lots of complex pages and sending no-cache headers. Then I am able to restart Zope and all is well. For a while, when these attacks were frequent, I had a crontab to zopectl restart every hour. But this event was different and I would like to know if anyone thinks that something I am doing wrong could cause the Zope process to become 'unkillable' and require a reset of the machine. Has anyone else had this problem? I would have liked to perform some diagnostic on the machine in its stuck state, but neither I nor the ISP knew where to start. I can accept that, as Dieter said, there are times when the only choice is to switch off and on the box - which I can't do remotely - but wonder if I could have done more... --- Chris Withers <[EMAIL PROTECTED]> wrote: > Ken Ara wrote: > > One and a half days later, I am again unable to > stop, > > restart or kill Zope. My ISP host is making > changes on > > their network and I believe the problem is with > them. > > I am in a FreeBSD jail, sharing the machine with a > DNS > > server. It's 3am over there, and I wish I could do > > something while waiting for them to wake up. Then, > we > > need to find out what is causing this problem. > > Move hosters. FreeBSD for all its robustness is not > something I'd > recommend running Zope on... > > > Is there no alternative to physically restarting > this > > machine? While we are stuck, is there anything I > can > > do to diagnose the problem? > > You may have more luck on a FreeBSD list... > > Chris > > -- > Simplistix - Content Management, Zope & Python > Consulting > - http://www.simplistix.co.uk > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Maciej Wisniowski wrote: DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. At the current state, it can't implement the whole interface. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and numerous other places where request.locale is used). The problem's roots go deeper. I just thought that if there is DateDisplayWidget class in Zope2.9.4 code then it may be used. It is a bit strange for me that Zope contains code that is unuseable. But ok, I'll use something different. It is not unusable if your request correctly implements IBrowserRequest. And even though it is in Zope 2.9.4, it comes from a Zope 3 based library. Five never gave you a guarantee that *all* Zope 3 components would instantly work in Zope 2 as soon as they're shipped with it. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
--On 5. September 2006 07:47:05 -0700 Ken Ara <[EMAIL PROTECTED]> wrote: OK, once again, after many hours of costly down time, we have restarted our Zope machine. Chris, could state your reasons for recommending against FreeBSD? I have had no trouble in over five years that I can directly attribute to FreeBSD, but I am open-minded. That said, I don't mean to reopen the 'best os' debate. This remark was just stupid. There is nothing with BSD except there are some known issues you need to consider when compiling Python (at least there were some issues in the past). -aj pgpuQziGgCmWn.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] UnicodeDecodeError inside ZMI
Hello, With Zope 2.8.7 and Python 2.3.5 (Plone 2.1.3 installer), when I search inside the ZMI for the spanish " ñ" character (inside a Plone site object), I get an UnicodeDecodeError: Site Error An error was encountered while publishing this resource. UnicodeDecodeErrorSorry, a site error occurred. Traceback (innermost last): Module ZPublisher.Publish, line 188, in publish_module_standard Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish Module ZPublisher.Publish, line 145, in publish Module Zope2.App.startup, line 216, in zpublisher_exception_hook Module ZPublisher.Publish, line 114, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module App.special_dtml, line 175, in _exec Module DocumentTemplate.DT_With, line 61, in render Module DocumentTemplate.DT_Util, line 196, in eval__traceback_info__: _ Module , line 0, in ? Module OFS.FindSupport, line 112, in ZopeFind UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 0: ordinal not in range(128) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 'portlet_intranet') ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problems with lists
Hi, I am trying to create five list to collect student scores. As you can see I am using simple html to create them. 1) 0 1 2 3 4 5 6 2) 0 1 < ;OPTIO N VALUE="3">2 3 4 5 6 .. 5) 0 1 2 3 4 5 6 I use the the following dtml commands to populate the db. But these are the results: REQUESTformstudent_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] Any ideas where I am going wrong. Thanks, Larry McDonnell ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with lists
Hi, I cleaned my glasses and saw that I fat fingered some keys. I am glad it was that easy to fix. Larry -- Original message from [EMAIL PROTECTED]: -- Hi, I am trying to create five list to collect student scores. As you can see I am using simple html to create them. 1) 0 1 2 3 4 5 6 2) 0 1 < ; ;OPT IO N VALUE="3">2 3 4 5 6 .. 5) 0 1 2 3 4 5 6 I use the the following dtml commands to populate the db. But these are the results: REQUESTformstudent_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] Any ideas where I am going wrong. Thanks, Larry McDonnell --- Begin Message --- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) --- End Message --- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
Ken Ara wrote at 2006-9-5 01:14 -0700: > ... >and I can't even restart the machine with the >shutdown command. If you cannot shutdown your system, then something seriously is wrong with it. It will have nothing to do with Zope. You may try the "reboot" command. It is similar to "shutdown" but start "reboot"ing immediately while "shutdown" (even with "-r") does something before it. You might even try "kill 1" or "kill -9 1" (this the initialization process; if killed, you *nix will go down). *BUT* I have not much hope for you... There are situations where only the "reset" button is able to bring the system again in a sane state. And your description seems to indicate such a situation... By the way, there are tools like "RemoteConsole" which allows you to "press" the "reset" button remotely. Our administrators use such tools. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with lists
- Original Message - From: [EMAIL PROTECTED] To: zope@zope.org Sent: Tuesday, September 05, 2006 1:30 PM Subject: [Zope] Problems with lists I use the the following dtml commands to populate the db. student_score1_temp[loop_counter])"> student_score2_temp[loop_counter])"> student_score3_temp[loop_counter])"> student_score4_temp[loop_counter])"> student_score5_temp[loop_counter])"> But these are the results: REQUEST form student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] I can't figure out what your dtml prior to the loop is trying to accomplish, however inside the loop your 'loop_counter' variable is a constant value (it does not change, so you keep referring to the same list element). You need something like: student_score1_temp[_['sequence-item']])"> The _['sequence-item'] will contain the current iteration result of your _.range(counter) statement. Better yet, do this in a python script (way easier). hth Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
Ken Ara wrote at 2006-9-5 07:47 -0700: >... >Of immediate concern to me is whether I can do >anything to prevent this happening again. From time to >time, my Zope hangs, usually because of an attack by a >bad robot requesting lots of complex pages and sending >no-cache headers. Then I am able to restart Zope and >all is well. For a while, when these attacks were >frequent, I had a crontab to zopectl restart every >hour. There are solutions (I think "daemontools", but may be wrong) that can automate this more intelligently than a cronjob. We have our own check server which polls Zope and if it does not respond in time restarts it. >But this event was different and I would like to know >if anyone thinks that something I am doing wrong could >cause the Zope process to become 'unkillable' and >require a reset of the machine. Has anyone else had >this problem? Up to Python 2.3.4 and Python 2.4.0 (fixed in Python 2.3.5 and Python 2.4.1), a fatal signal (like "SIGSEGV") could bring Zope in a state where its main thread was killed but the child threads were still alive. These child threads could only be killed with "kill -9". Although we now use Python 2.4.1, I have seen a similar problem just a few days ago. But almost surely, this has to do with the Java Virtual Machine which we now also integrate in our Zope instances. However, when even "kill -9" (as "root") is no longer able to kill a process, then the process is somewhere deep in the operating system (where signal handling is deactivated for consistency reasons). Usually, this indicates a network problem. And if your operating system is no longer ready to shutdown, then you have an even more fundamental problem -- maybe, too, connected to network problems. I fear we cannot help you much -- as a intensive analysis of your system would be necessary in order to find the causes of your problems. >I would have liked to perform some diagnostic on the >machine in its stuck state, but neither I nor the ISP >knew where to start. Usually, one would start with an analysis of the operating system log files. If they do not tell anything, then one would check what is still working (e.g. is the console still responding, does it still observe the magic "CTRL-ALT-DEL" reboot key sequence), which commands fail and in what way, ... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Hmm... Localizer or Localizer
On 9/5/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Peter Bengtsson wrote: > But how do you use it? I installed Five 1.2.6 > In my product's directory I created a configure.zcml that looks like this:: > http://namespaces.zope.org/zope"; > xmlns:browser="http://namespaces.zope.org/browser"; > xmlns:i18n="http://namespaces.zope.org/i18n"; > package="Products.RememberYourFriends"> > > > > > > Starts without errors. My ryf-sv.po file isn't automatically compiled > to .mo Right. The Zope 3 machinery doesn't do that. Use msgfmt from the gettext utilities to compile catalogs. You're also using PTS's non-standard directory layout. The standard gettext layout is somedir/LC_MESSAGES//.mo. PTS supports this as well but Plone continues not to go standard here and set a bad example :( Seems awefully academic to me but if that's the standard, let's do it. I now have a file called: locales/LC_MESSAGES/sv/ryf.mo > and I tried changing the HTTP_ACCEPT_LANGUAGE variable but > still just the old default English. HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header (Accept-Language) that you really shouldn't modify. The request should be treated as read-only. To test languages, either write your own IUserPreferredLanguages adapter that returns the language you want or simply configure your browser to send a different Accept-Language header. In Firefox, you can simply do this by entering "about:config" in the URL bar and changing the setting of the intl.accept_languages variable (e.g. to "se, en"). > Either I've missed something big and crucial or there's a bug in lack > of errors or alerts. You simply didn't read Five/doc/i18n.txt (http://codespeak.net/z3/five/i18n.html). Googling "five i18n" gives you that as a first hit. "RTFM" is all I can say here. Don't RTFM me! I've read that page and unless you have a PhD in physics and indept experience of Zope 3 is really doesn't make a lot of sense. Plus, I've got your cookbook at home :) So, should I use PTS or not?? "The default behaviour for choosing languages in Five is the one of Zope 3: analyze the Accept-Language HTTP header and nothing more." This is not good enough. When I send out email alerts to people in my app, that's a wget script that kicks if off, not a Mozilla browser. Besides, what if an Englishman is using a Swedish internetcafe-computer when on holiday; in that case I want to allow him to manually configure his user profile on my site. I have no idea what this does or what I'm supposed to do with: Please tell me there's a function or something that works like this:: def index_html(self): uid = self._getLoggedinUID() wants_lang = self._getUserPreference(uid, default='en') setCurrentLanguage(wants_lang) return _("I wish it was easier") def manage_setUserPreference(self, uid, lang): if lang in getAvailableLanguages(): self._setUserPreference(uid, lang) Where _getUserPreference() and _setUserPreference() is something I'm expected to write for my app. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MailBoxer Problem Found...But Not Solved
beno wrote at 2006-9-4 16:41 -0400: > ... >Frankly, I though (and still suspect) that the fact that the site >2012.vi:7080 doesn't resolve because of the Pound/Squid/Zope interface >but 202.71.106.119:7080 does combined with the fact that I have to send >my email to [EMAIL PROTECTED] (mail being the SMTP) was causing the >problem. What does "not resolve" mean precisely (you need to be *VERY* precise when you report problems)? As you use it, one would repect a DNS (Domain Name Service) problem: It is the task of the DNS to resolve "2012.vi" into its IP address (apparently 202.71.106.119). If you are using virtual hosting (I do not know the Pound details, only that of Apache), then additional requirements (beside a working DNS) may be necessary. For Apache named virtual hosts, e.g., not only the external DNS must map the name to the IP address but the internal DNS as well. > ... >Where else should I be looking? Maybe, you look in your neighbourhood whether you find a knowledgable person, pay his travel to visit you and help you in setting up the system. There are cases, where a mailing list cannot solve all problems and direct personal interaction becomes necessary... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200: >Maciej Wisniowski wrote: >> > I consider this a feature request but not as a bug. >> Ehm... I'm not sure whether we understand each other. >> >> I mean the bug > >There is no bug. Seems a funny interpretation of "no bug" for me... > >> is that DateDisplayWidget in Zope2.9.4 uses >> request.locale which as you said is from Zope3 world. So, as far as I >> understand, reference to 'request.locale' shouldn't appear in Zope >> 2.9.4 code at all but it does... Do you mean it is correct?? > >DateDisplayWidget expects an IBrowserRequest. Zope 2's request only >pretends to be an IBrowserRequest. If that is not a bug (pretending to implement "IBrowserRequest" but not doing so) what is a bug? >At the current state, it can't >implement the whole interface. Which means, that there is a bug but you have currently little chance to fix it... By the way, you could introduce a configuration option that allows the user to determine whether he is more interested in a true "IBrowserRequest" request or a more backward compatible request. >That's a known issue, but we can't do anything about it, at least not in >DateDisplayWidget (and numerous other places where request.locale is >used). The problem's roots go deeper. That you know it and do not want to change it does not mean that "bug" is not an appropriate term... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with lists
Pls keep your posts on the list... Regarding python scripts: the best place to start would be the Basic Scripting section of the Zope Book, which you can find here: http://www.plope.com/Books/2_7Edition/BasicScripting.stx For examples, have a look at the Python(Script) section of: http://zopelabs.com/ Jonathan - Original Message - From: [EMAIL PROTECTED] To: Jonathan Sent: Tuesday, September 05, 2006 2:23 PM Subject: Re: [Zope] Problems with lists Hi, I am sending this to you versus the list. Everyone says to use Python but I am the kind of guy who needs an example. But I am having a hard time finding the Zope/Python related examples. If you could point me in the right direction or one of your site that would be great. Thanks for the pointers, Larry -- Original message from "Jonathan" <[EMAIL PROTECTED]>: -- > > - Original Message - > From: [EMAIL PROTECTED] > To: zope@zope.org > Sent: Tuesday, September 05, 2006 1:30 PM > Subject: [Zope] Problems with lists > I use the the following dtml commands to populate the db. > > > > > > > > > > > > > > > > > > But these are the results: > > REQUEST > form > student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] > Submit 'Submit' > student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] > student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] > student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] > student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] > > > I can't figure out what your dtml prior to the loop is trying to accomplish, > however inside the loop your 'loop_counter' variable is a constant value (it > does not change, so you keep referring to the same list element). You need > something like: > > > > > The _['sequence-item'] will contain the current iteration result of your > _.range(counter) statement. > > Better yet, do this in a python script (way easier). > > > hth > > Jonathan > > > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200: > ... >It's an issue, not a bug. According to Wikipedia: A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result. A request object that declares to implement "IBrowserRequest" but does not, is not working as intended -- and constitutes a bug. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] UnicodeDecodeError inside ZMI
Remy Pinsonnault wrote at 2006-9-5 11:18 -0400: >With Zope 2.8.7 and Python 2.3.5 (Plone 2.1.3 installer), when I search >inside the ZMI for the spanish "ñ" character (inside a Plone site object), I >get an UnicodeDecodeError: > > Site Error > >An error was encountered while publishing this resource. > >*UnicodeDecodeError* >Sorry, a site error occurred. > >Traceback (innermost last): > ... > - Module OFS.FindSupport, line 112, in ZopeFind > >UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 0: >ordinal not in range(128) This means that unicode and (non ASCII) byte strings are mixed together. Search the mailing list for "UnicodeDecodeError" (or "setdefaultencoding") to find out how you can approach this problem. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200: Maciej Wisniowski wrote: > I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug There is no bug. Seems a funny interpretation of "no bug" for me... It's an unfortunate situation. That's what it is. is that DateDisplayWidget in Zope2.9.4 uses request.locale which as you said is from Zope3 world. So, as far as I understand, reference to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it does... Do you mean it is correct?? DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. If that is not a bug (pretending to implement "IBrowserRequest" but not doing so) what is a bug? I'll call this an "issue" for now, but I won't argue semantics here. All I can say is that the Five project's promises were never that everything from Zope 3 works instantly. And it has also been Five's policy to make a quick lie here and there just to get things going. Five usually gives you 95% of a certain technology you know from Zope 3. The remaining 5% are friction loss due to Zope 2isms like Acquisition, etc. In order to "sell" Zope 2's request to the Zope 3 machinery, Five originally made Zope 2's request an IBrowserRequest -- even though that was a lie. When Five was integrated into Zope 2, that lie was carried on in Zope 2. I was neither the one to make that initial "lie" nor was I there when Five was integrated. At the current state, it can't implement the whole interface. Which means, that there is a bug but you have currently little chance to fix it... The problem with going forward with this and fixing it is the following (quoting myself from an earlier email on this thread): We can't even just make the Zope 2 request have that attribute because of potential backward incompatibilities. Why? Because you can do request.locale in Zope 2 right now which is an equivalent spelling of request['locale'] (it looks up request variables). If existing applications use the attribute access instead of the item access (which should clearly be the preferred way, but there's lots of Zope 2 legacy), they would break because request.locale would now find something else. It's not a bug. It's Zope 2's obscenity with __getattr__ APIs instead of __getitem__ APIs that's preventing the harmonizing of the two implementations, that's all. Both the ObjectManager and the request are very good examples of how Zope 2 got this wrong, but Zope 3 got it right. By the way, you could introduce a configuration option that allows the user to determine whether he is more interested in a true "IBrowserRequest" request or a more backward compatible request. I'm not sure that that will work. In complicated systems like Plone, you might end up with some products that rely on the old way of doing things while Plone uses Zope 3 components that obviously want the "true" IBrowserRequest request at same time. Note that I'm well aware of this issue and have thought hard about it. I think the only long term solution out of this mess is to get rid of the __getattr__ spelling once and for all. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and numerous other places where request.locale is used). The problem's roots go deeper. That you know it and do not want to change it does not mean that "bug" is not an appropriate term... You're claiming that I don't *want* to change it. That's not true. I am thinking hard about this, but I see no easy solution. Of course, I'd be more than happy if an easy solution can be found. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200: ... It's an issue, not a bug. According to Wikipedia: A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result. A request object that declares to implement "IBrowserRequest" but does not, is not working as intended -- and constitutes a bug. Fine. Call it a bug. I don't care. Arguing semantics won't solve that problem now, will it. Remove the IBrowserRequest declaration and see Five break. Perhaps it was the wrong thing to do at the time (it certainly wasn't me who did it), but that's just how it is. We'll have to live with it now. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Hmm... Localizer or Localizer
Peter Bengtsson wrote: HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header (Accept-Language) that you really shouldn't modify. The request should be treated as read-only. To test languages, either write your own IUserPreferredLanguages adapter that returns the language you want or simply configure your browser to send a different Accept-Language header. In Firefox, you can simply do this by entering "about:config" in the URL bar and changing the setting of the intl.accept_languages variable (e.g. to "se, en"). > Either I've missed something big and crucial or there's a bug in lack > of errors or alerts. You simply didn't read Five/doc/i18n.txt (http://codespeak.net/z3/five/i18n.html). Googling "five i18n" gives you that as a first hit. "RTFM" is all I can say here. Don't RTFM me! I've read that page and unless you have a PhD in physics and indept experience of Zope 3 is really doesn't make a lot of sense. Plus, I've got your cookbook at home :) You must be confusing me. I don't have a PhD in physics and I didn't write a cookbook. That was the other German ;). So, should I use PTS or not?? No. I think I've answered that question before. "The default behaviour for choosing languages in Five is the one of Zope 3: analyze the Accept-Language HTTP header and nothing more." This is not good enough. Then implement your own IUserPreferredLanguages adapter. This is documented in my book which you may or may not have, not sure ;) When I send out email alerts to people in my app, that's a wget script that kicks if off, not a Mozilla browser. Besides, what if an Englishman is using a Swedish internetcafe-computer when on holiday; in that case I want to allow him to manually configure his user profile on my site. Sure. That's possible. With a custom IUserPReferredLanguages adapter. I have no idea what this does or what I'm supposed to do with: Nothing. The docs say that this is only for users who use PTS for legacy. You're not one of them. Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
I'll call this an "issue" for now, but I won't argue semantics here. All I can say is that the Five project's promises were never that everything from Zope 3 works instantly. And it has also been Five's policy to make a quick lie here and there just to get things going. Five usually gives you 95% of a certain technology you know from Zope 3. The remaining 5% are friction loss due to Zope 2isms like Acquisition, etc. I don't catch one thing. There is Five/formlib/formbase.py where Five overrides handle_edit_action. Why it is overriden? "To remove dependecy on request.locale". Why can't be same thing done with DateDisplayWidget? Isn't this a simple solution? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200: > ... >Note that I'm well aware of this issue and have thought hard about it. I >think the only long term solution out of this mess is to get rid of the >__getattr__ spelling once and for all. The "__getattr__" may be a stumbling block in principle. Practically, it will very rarely hinder you to add attributes (such as "locale") to the request. True: you can use "REQUEST.locale" or "REQUEST.debug" and expect to access in fact "REQUEST['locale'] and "REQUEST['debug']" respectively. But, it is rare that the attribute access syntax is used and if it indeed results in the wrong result (because the request grew additional attributes), then it is easy to fix. Adding the configuration option would (perhaps) make the administrator aware of the potential cause when he gets informed about wrong values read from the request. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200: ... Note that I'm well aware of this issue and have thought hard about it. I think the only long term solution out of this mess is to get rid of the __getattr__ spelling once and for all. The "__getattr__" may be a stumbling block in principle. Practically, it will very rarely hinder you to add attributes (such as "locale") to the request. I think "locale" and "debug" are just common enough to be form variables. True: you can use "REQUEST.locale" or "REQUEST.debug" and expect to access in fact "REQUEST['locale'] and "REQUEST['debug']" respectively. But, it is rare that the attribute access syntax is used You'd be surprised (I was too). Plus, TALES path expressions first try attribute access, then item access. and if it indeed results in the wrong result (because the request grew additional attributes), then it is easy to fix. Sure, but it's a BBB foul. It's not *me* who has the legacy code, so I wouldn't mind. But I'm sure others would. Adding the configuration option would (perhaps) make the administrator aware of the potential cause when he gets informed about wrong values read from the request. Perhaps. A configuration option (that would usually be turned to 'off') would surely be a quick way of finding out where you have code that uses request.foo. It may be a good step leading an actual deprecation of the __getattr__ spelling (which I think is necessary for eliminating the reuquest.foo spelling once and for all, especially in newly created code). Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: request.locale - do we have this in 2.9.4?
Maciej Wisniowski wrote: I'll call this an "issue" for now, but I won't argue semantics here. All I can say is that the Five project's promises were never that everything from Zope 3 works instantly. And it has also been Five's policy to make a quick lie here and there just to get things going. Five usually gives you 95% of a certain technology you know from Zope 3. The remaining 5% are friction loss due to Zope 2isms like Acquisition, etc. I don't catch one thing. There is Five/formlib/formbase.py where Five overrides handle_edit_action. Why it is overriden? "To remove dependecy on request.locale". Why can't be same thing done with DateDisplayWidget? Isn't this a simple solution? Sure. As I said earlier, we are happy to accept patches :) Philipp ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope 3 invisibility
Hello everyone,I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. I have been following the efforts of the Zope 3 developers and sometimes wonder why this invisibility effect takes place. That's why I decided to see if anyone on this list feels like commenting about this, or any of my other 10 points. I am very interested in the dynamics of the Zope community and the place of Zope in the larger Python community, and would be very thankful for any comments, here or on the blog. Thanks very much.Carlos de la Guardia ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope 3 invisibility
David H wrote: Carlos de la Guardia wrote: Hello everyone, I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. I have been following the efforts of the Zope 3 developers and sometimes wonder why this invisibility effect takes place. That's why I decided to see if anyone on this list feels like commenting about this, or any of my other 10 points. I am very interested in the dynamics of the Zope community and the place of Zope in the larger Python community, and would be very thankful for any comments, here or on the blog. Thanks very much. Carlos de la Guardia My invisibility with Zope 3 is Zope 2. When I think of something Zope 2 is failing to provide I will try Zope 3 . I see Django and Turbogears as "toys" by comparison :-) David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope 3 invisibility
On 9/5/06, Carlos de la Guardia <[EMAIL PROTECTED]> wrote: I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. Interesting. I've always considered blogs to be fairly invisible since I have to go look for them, whereas for mailing lists I can sign up for things I'm interested in. -Fred -- Fred L. Drake, Jr. "Every sin is the result of a collaboration." --Lucius Annaeus Seneca ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Change the encoding of a single ZPT page
2006/8/31, Andreas Jung <[EMAIL PROTECTED]>: --On 31. August 2006 19:28:54 +0200 Dieter Maurer <[EMAIL PROTECTED]>wrote:> Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300:>> 2006/8/29, Andreas Jung < [EMAIL PROTECTED]>:>> ...>> After trying a lot of things, I found the problem is really in the>> zpublisher realm, no matter what kind of encoding trick I use, even with >> a python script, the output is converted to the default encoding if I>> use any variable or dynamic value from the database.>> If you were right (which I still hope you won't) than someone > severely misunderstood the meaning of "default".>I think he is not right.-ajZope did respect the default setting when I changed the charset header in the file. The lesson learned is: Working with two encoding charsets is very trick, and even trickier if you use the ZMI to edit files. I had to create a simple ZPT file with the initial XML block and "inject" the rest of the xml data, including variables and database, using a tal:content pointing to a python script encoding everything to utf-8. The ZPT file was needed as simple way to change the charset header trough the ZMI.When you change the charset trough the ZMI Zope trows an exception if it find any non-conforming character, the problem is that since the default charset is set to iso Zope reencodes my file to iso when it generates the editing form field so when I submit it back Zope raises an exception. Considering I can't change everything to utf-8 I will have to live with it and maybe find a simpler pattern to change the charset without raising an exception (maybe the dummy tal:define?).I hope it help others. Thanks for your help and time, -- Luiz Fernando B. Ribeiro ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )