Re: [Zope] adding objects to a ZCatalog

2007-02-24 Thread Peter Bengtsson

change

context.ImageData.manage_catalogObject(newimage_image, uid)

to
self.ImageData.manage_catalogObject(newimage_image, uid)


--
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: Problems receiving mails from the list

2007-02-24 Thread Michael Haubenwallner

Garito wrote:

Hi all!

The zope list don't work properly for me for 2 days ago with my normal
account [EMAIL PROTECTED]

I send several messages (as you could see here:
http://tech.groups.yahoo.com/group/zope/message/166174 and here:
http://tech.groups.yahoo.com/group/zope/message/166152) but both were lost
for me (don't came back to my box)

I try to send some message to ask at 
[EMAIL PROTECTED] and

[EMAIL PROTECTED] nothing in response




http://mail.zope.org/pipermail/zope/2007-February/170578.html
http://mail.zope.org/pipermail/zope/2007-February/170585.html
http://mail.zope.org/pipermail/zope/2007-February/170599.html

there seems to be no problem except with your client software.

http://mail.zope.org/mailman/listinfo/zope gets you every information on 
how to subscribe to the zope mailing list.

posting through other services (like gmane.org) might not need subscription.
in case of doubt always check the mailing list archives first.

michael

--
http://zope.org/Members/d2m
http://planetzope.org

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Running ./zopectl gives NameError: name 'set' is not defined

2007-02-24 Thread Philipp von Weitershausen

michael nt milne wrote:

Hi

On trying to make a new zopeinstance from a Plone 2.5 instance created 
using the unified installer I am getting the following error when I 
attempt to run ./zopectl and start the instance.


Traceback (most recent call last):

...

NameError: name 'set' is not defined


Sounds like you're using Python 2.3 while Python 2.4 is required.


--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5

___
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] invalid property value: wrapped object

2007-02-24 Thread Sascha Welter
(Fri, Feb 23, 2007 at 09:39:16AM -0800) Anthony Monta wrote/schrieb/egrapse:
 Running Zope 2.6.1/Python 2.1.3, I get the following error when I try
 to pass form values to a custom ZClass instance-creating method:

2003 called, they want their auctioned off aeron chairs back!

Regards,

Sascha

___
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 unresponsive

2007-02-24 Thread Paul Williams
I have posted this several times, but have not until now been able to
get DeadlockDebugger installed.  I see several people have had this
problem, but no-one has posted a solution.

 

zope 2.9.5 + zeo
pythonm2.4.3
Red Hat RHEL 4
Plone 2.5.1
 
Our zeo clients hang intermittently.  We have no way of reproducing the 
problem, but it occurs daily.  The client hangs and a restart seems to
fix the 
problem.
 
In the event log with tracing on we get
 
Trace zeo.zrpc.Connection(C) wait(16697) {server:8100} pending, async=0
 
There are hundreds to thousands of these until the server is restarted.
 
In the zeo log we get
 
Error caught in asyncor asyncore.py
 
error:(110,'Connection timed out')
 
We have been trying to track this down and have had no luck.  Does
anyone have 
any suggestions?  Below is our deadlock debugger output

 

 

Threads traceback dump at 2007-02-23 15:26:50

 

Thread -1269564496 (GET
/VirtualHostBase/https/soawds:443/VirtualHostRoot/Content///training):

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZServer/PubC
ore/ZServerPublisher.py, line 23, in __init__

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/P
ublish.py, line 395, in publish_module

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/P
ublish.py, line 196, in publish_module_standard

  File
/apps1/zope2.9.5/navo_instance/Products/PlacelessTranslationService/Pat
chStringIO.py, line 34, in new_publish

x = Publish.old_publish(request, module_name, after_list, debug)

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/P
ublish.py, line 115, in publish

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/m
apply.py, line 88, in mapply

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/P
ublish.py, line 41, in call_object

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Shared/DC/Sc
ripts/Bindings.py, line 311, in __call__

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Shared/DC/Sc
ripts/Bindings.py, line 348, in _bindAndExec

  File
/apps1/zope2.9.5/navo_instance/Products/CMFCore/FSPageTemplate.py,
line 195, in _exec

result = self.pt_render(extra_context=bound_names)

  File
/apps1/zope2.9.5/navo_instance/Products/CacheSetup/patch_cmf.py, line
38, in FSPT_pt_render

result = FSPageTemplate.inheritedAttribute('pt_render')(

  File
/apps1/zope2.9.5/navo_instance/Products/CacheSetup/patch_cmf.py, line
92, in PT_pt_render

tal=not source, strictinsert=0)()

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 238, in __call__

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 281, in interpret

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 749, in do_useMacro

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 281, in interpret

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 457, in do_optTag_tal

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 442, in do_optTag

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 437, in no_tag

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 281, in interpret

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 749, in do_useMacro

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 281, in interpret

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInter
preter.py, line 507, in do_setLocal_tal

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Products/Pag
eTemplates/TALES.py, line 221, in evaluate

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Products/Pag
eTemplates/Expressions.py, line 185, in __call__

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Products/Pag
eTemplates/Expressions.py, line 180, in _eval

  File
/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Products/Pag
eTemplates/Expressions.py, line 85, in render

  File
/apps1/zope2.9.5/navo_instance/Products/CMFPlone/browser/plone.py,
line 66, in globalize

self._initializeData(options=options)

  File
/apps1/zope2.9.5/navo_instance/Products/CMFPlone/browser/plone.py,
line 147, in _initializeData

self._data['language'] =  self.request.get('language', None) or \

  File /apps1/zope2.9.5/navo_instance/Products/Archetypes/ClassGen.py,
line 58, in generatedAccessor

return schema[name].get(self, **kw)

  File /apps1/zope2.9.5/navo_instance/Products/Archetypes/Field.py,
line 802, in get

value = ObjectField.get(self, instance, **kwargs)

  File 

[Zope] Large jumps of memory use increase, and seeking overall understanding of memory use

2007-02-24 Thread Jean Lagarde

All,

(I am posting to both the general Zope and Plone lists, I hope that's
all right. My questions are more directly Zope issues, but in case
someone who only looks only at the Plone lists has a different insight
to offer...)

I'm the co-admin Alex Kirk was referring to in his recent post Random
Crashes/Freezes on FreeBSD 5.4-RELEASE on the Zope list. The
particular instance he was referring to was not a random crash but
simply Zope running out of memory (with the standard 512M limit on
FreeBSD, that we have not increased so far -- we have 2Gb of physical
memory). I have had one truly unexplained unresponsive Zope on that
system so far, but was not able to characterize it well enough to ask
an intelligent question on the list about that one.

I fully understand that Zope has to be restarted regularly and intend
to use monit to do so, but I would like to better understand what is
going on in any case, and hopefully be able to lower the required
frequency of such restarts. I have searched the lists (posts like
[Zope-dev] Very severe memory leak and [ plone.user] Memory leaks
even with latest-everything minimalistic site?) and get the general
idea, but what I have read so far does not directly explain what I am
observing.

I have a test machine, but for starters, I have done some analysis of
memory consumption of our live site to see what normal traffic
produces. I have used a script to capture the size of the Zope process
every minute (from ps) and merged these results with the access log.
What I see does not make sense to me in terms of object cache, or
growth of refcounts. My only (entirely unverified) hypothesis is that
modules like PIL grab large chunks of memory once in a while. I
provide specific examples below.

First, the system:

Plone 2.5.1,
CMF-1.6.2,
Zope (Zope 2.9.5-final, python 2.4.3, freebsd5),
Five 1.3.7,
Python 2.4.3 (#2, Jul 2 2006, 16:14:54) [GCC 3.4.2 [FreeBSD] 20040728],
PIL 1.1.5
FreeBSD 5.4

My object cache size was initially at the default of 5000 objects per
threads (4 threads default). I reduced this to 2000 just to see, but
as I expected, the overall memory use behavior was the same.

I have made some minor customizations to Plone and added contributed
as well as my own products. My use of CMFReportTool might explain some
of what I see, but definitely not all.

Overall, my custom memory-use/access-log shows long periods with no
increase in memory at all, but there are some big jumps at times
(during a one minute tick) by 5, 10, even 25 Mb! As pretty much
expected, Zope never gives much memory back to the OS; that part I
understand, however I would like to get it to a state where it mostly
plateaus and then only slowly creeps up.

Some specific examples:

With memory use at 417640 Kb, no requests at all in the previous
minute, and a single request for an image_view_fullscreen in that
whole minute, memory use jumped by 5064 Kb to 422704. The image was
definitely not that large! (access log shows size returned was 1137).

While on that topic, I realize that the ATImage has to be loaded in
the object cache at some point, and that if it's a large image (in the
order of mega bytes), I might see the memory use jump by that much.
Now assume that the cache was already full when the image was loaded,
that a lot of other later requests fill the cache with much smaller
objects (so the image is not cached anymore) and then later the image
is requested again, my guess is that the cache should already have the
space it needs to load it, i.e. should I expect to see another memory
jump by the size of the image, and if so, why (where did the space it
originally occupy go that it can't be reused)? Can I easily check if
large objects are being split in smaller chunks as they should by the
way?

Other example: A few of the large jumps I noticed have as one of the
request during that minute a PDF listing of some documents. I use
CMFReportTool to generate the PDF. There seems to be a possible
correlation there, however, the resulting PDF document is about 150K,
and these memory jumps can be as large as 10 Mb! I'll have a look at
my code, CMFReportTool's and ReportLab's, but that seems a bit
excessive to produce that document, so I wonder if something else is
going on there. Of course, there is a catalog query required to get
the documents to list, but I generate the report with the metadata
only ( i.e. so nothing should be loaded in the object cache). I expect
some increase in memory the first time a module is loaded (like
ReportLab, although doesn't that happen when Zope is launched as part
of product initialization?), but that would not explain continued
increases on further requests. There are also many cases where the
same listing was requested with no increase in memory at all (although
that may be due to caching -- I'll have to look into that; I use
cacheFu but have turned Squid off for now).

Other example: There are however cases where I just can't see any
reason for the sudden jumps. In one 

Re: [Zope] zope unresponsive

2007-02-24 Thread Brian Sullivan

On 2/24/07, Paul Williams [EMAIL PROTECTED] wrote:




I have posted this several times, but have not until now been able to get
DeadlockDebugger installed.  I see several people have had this problem, but
no-one has posted a solution.

 zope 2.9.5 + zeo
pythonm2.4.3
Red Hat RHEL 4
Plone 2.5.1

Our zeo clients hang intermittently.  We have no way of reproducing the
problem, but it occurs daily.  The client hangs and a restart seems to fix
the
problem.



I don't know if this even relevant but I also have had Zope go into
lala land and struggled for a while trying to figure out what was
going on. Like your situation it happened intermittently and a reboot
recovered (and sometimes seemed to recover on its own). And like you I
tried various methods to spot the problem including installing
DeadlockDebugger.

This was in various versions of Zope running on Win2003.

In the end I found it was a page/browser at the root of the problem.
It turns it is very easy to mount an inadvertent DOS attack on Zope
that kills it. In my case I had a javascript in a periodic timer event
handler (with a fairly short period) that did a page reload and under
certain circumstances didn't clear the timer causing a timer event
driven endless loop.
___
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 unresponsive

2007-02-24 Thread Marco Bizzarri

On 2/24/07, Paul Williams [EMAIL PROTECTED] wrote:





I have posted this several times, but have not until now been able to get
DeadlockDebugger installed.  I see several people have had this problem, but
no-one has posted a solution.



I don't know if that can be the case, but is there a firewall between
your Zope and your ZEO? I remember some discussions about firewalls
between Zope and ZEO which could cause problems...

Regards
Marco

--
Marco Bizzarri
http://iliveinpisa.blogspot.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-dev] Re: Caching ZCatalog results

2007-02-24 Thread Dieter Maurer
Roché Compaan wrote at 2007-2-23 22:00 +0200:
 ...
Thanks for that pointer. It's good that way, it should make invalidation
easier. It could be as simple as invalidating any cached result that
contains the documentId being indexed. Do you see any problem with the
following invalidation strategy:

If the 'documentId' exists (cataloging existing object), invalidate all
cached result sets that contain the documentId.

If the 'documentId' doesn't exist (cataloging new object), invalidate
all result sets where the ids of indexes applied, are contained in the
cache key for that result set.

I see several problems:

  *  the RAMCacheManager does not provide an API to implement
 this policy

  *  a cache manager would need a special data structure
 to efficiently implement the policy (given a documentId,
 find all cached results containing the documentId).

  *  Apparently, your cache key contains the indexes involved
 in producing the result.

 The problem with this is that these indexes are known
 only after the query has been performed:

The catalog API allows indexes to respond to subqueries,
that do not contain their own name.

I use this feature to allow a Managable RangeIndex
to transparently replace effective, expires queries.

But otherwise, the feature is probably not used
intensively.

 Of course, you can add the information *after*
 the query has been performed and use it for invalidation -- in
 a specialized cache manager.


 On the other hand, new objects are usually indexed with
 all available (and not only a few) indexes.

 While some of the indexes may not be able to determine
 a senseful value for the document, the standard indexes
 have problems to handle this properly (ManagableIndexes can)
 and the API does not propagate the information.



-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 7 OK

2007-02-24 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Fri Feb 23 12:00:00 2007 UTC to Sat Feb 24 12:00:00 2007 UTC.
There were 7 messages: 7 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:07:32 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007321.html

Subject: OK : Zope-2.6 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:09:02 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007322.html

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:10:32 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007323.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:12:02 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007324.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:13:32 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007325.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:15:02 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007326.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Fri Feb 23 21:16:32 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007327.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )