Re: [Zope] all_meta_types confusion

2007-01-09 Thread Garth B.

Hello Dieter,

This is my all_meta_types function:

def all_meta_types(self):
   return (
   {
   'name' : 'Web Page',
   'action': 'manage_addProduct/DWT/WebPage_add',
   'permission': 'Add Web Page',
   },
   )

I haven't followed Maciej's suggestion yet to use pdb to more closely trace
what's going on, but if you have suggestions on what *might* be going on to
help me in my debugging, that would be great.

Thank you,
Garth

On 1/7/07, Dieter Maurer [EMAIL PROTECTED] wrote:



 You have included the 'permission' definition in your meta_type
entry?

Garth B. wrote at 2007-1-5 23:06 -0500:

I'm trying to filter the objects that appear in the Add drop down, and I'm
having odd results.  There are two scenarios.

In the first scenario, the active user is a Manager and my folderish
object
does not have a defined all_meta_types function.  Everything shows up in
the
Add drop down as expected.  When I define all_meta_types for my folderish
object to only return one kind of object, the Add x button appears
as
one would expect.

In the second scenario, I have a role Editor which controls what kinds
of
objects the user can add.  When I do not have an all_meta_types function
defined on my folderish object, only those objects that the role permits
the
user to add are shown.  When I define all_meta_types for my folderish
object
to only return one of the kinds of objects that the role does permit, the
user can't add anything.  No Add x button that one would normally
see
when only able to add a single type of object to a folderish object.

--
Dieter

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


[Zope] all_meta_types confusion

2007-01-05 Thread Garth B.

Hey everyone,

Zope 2.9.6

I'm trying to filter the objects that appear in the Add drop down, and I'm
having odd results.  There are two scenarios.

In the first scenario, the active user is a Manager and my folderish object
does not have a defined all_meta_types function.  Everything shows up in the
Add drop down as expected.  When I define all_meta_types for my folderish
object to only return one kind of object, the Add x button appears as
one would expect.

In the second scenario, I have a role Editor which controls what kinds of
objects the user can add.  When I do not have an all_meta_types function
defined on my folderish object, only those objects that the role permits the
user to add are shown.  When I define all_meta_types for my folderish object
to only return one of the kinds of objects that the role does permit, the
user can't add anything.  No Add x button that one would normally see
when only able to add a single type of object to a folderish object.

For the same type of object, and when logged in as an Editor, the call to
user.has_permission() (around line 254) in filtered_meta_types() in
ObjectManager.py, returns false when all_meta_types is defined, and returns
true when it isn't.  I don't know why the user would not have permission to
add this type of object when all_meta_types is defined versus when it
isn't.  This is why I'm confused.

No errors or exceptions.

So, in summary, when I don't have all_meta_types defined for my folderish
object, the five types of objects the role is permitted to add is shown in
the Add drop down.  When I set all_meta_types to only permit one of those
five types of objects to be added, the user can't add anything.  A user with
the Manager role doesn't appear to have this problem.

Any suggestions for what's going on here?  Any insights are appreciated!

Thank you,
Garth
___
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] What is an InvalidObjectReference?

2006-11-09 Thread Garth B.
Hello everyone,I'm sporadically getting the following error thrown as a result of a routine I've written.InvalidObjectReference: Attempt to store a reference to an object from a separate connection to the same database or multidatabase.
I can often run this routine several times without a problem. After a fresh Zope (re)start, this error never happens on the first run. Once the problem does occur I need to restart Zope to make it go away.
Can anyone tell me what this error actually means, and what bad practices could cause it?I've found a couple of hits about InvalidObjectReference: Attempt to store an object from a foreign database connection error in the archives, but I don't know how close this is to my problem.
An example traceback would be:---2006-11-08T16:47:49 ERROR Zope.SiteErrorLog http://localhost:8080/WebSites/dev/test1/manage_publish
Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.DWT.WebBase
, line 756, in manage_publish Module Products.DWT.WebBase, line 724, in manage_publish Module OFS.CopySupport, line 564, in _getCopy Module transaction._manager, line 110, in savepoint Module transaction._transaction, line 295, in savepoint
 Module transaction._transaction, line 292, in savepoint Module transaction._transaction, line 675, in __init__ Module ZODB.Connection, line 1012, in savepoint Module ZODB.Connection, line 526, in _commit
 Module ZODB.Connection, line 553, in _store_objects Module ZODB.serialize, line 407, in serialize Module ZODB.serialize, line 416, in _dump Module ZODB.serialize, line 341, in persistent_idInvalidObjectReference: Attempt to store a reference to an object from a separate connection to the same database or multidatabase
---I'm only dealing with one ZODB, so perhaps this is a multiple connection issue (although I have no idea how/why).In case it helps to know the context of the problem, I have a collection of objects I've written:
1) WebSite, based on OrderedFolder2) WebSection, based on OrderedFolder3) WebPage, based on ZopePageTemplate4) WebImage, based on Image.Each of these classes inherit a common base of functionality from a WebBase class. The manage_publish() method, defined in WebBase, copies the current object (one of #'s 2-4) to the same relative path within the context of another WebSite. This gives me a basic dev to live publishing process.
Perhaps the most complex part of this routine is its ability to recurse. For example, a WebPage on the dev WebSite will first call its parent WebSection's manage_publish() if the parent WebSection doesn't exist on the live WebSite.
Other things do happen during the process which might be causing this InvalidObjectReference, but if I can get a grip on what kinds of programming offenses causes this exception then I can make a more educated review of my code. I will happily provide a copy of the source if anyone is interested or thinks it will be useful. 
Thank you for any help or advice!Garth
___
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] What is an InvalidObjectReference?

2006-11-09 Thread Garth B.
Ok, I understand in theory what the problem is, I'm just not clear where in code this could be happening. I'm not consciously manipulating connections and I guess Zope is taking care of those low-level connection details with the ZODB for me.
Can I programmatically determine whether an object is already loaded/cached by a different connection?Would it help to try isolate this routine to a single connection?*Can* I isolate this routine to a single connection?
You know, I'm starting to think that my fancy little recursion between objects is what's royally screwing things up. A lot of loading of objects occurs here, possibly touching on the same objects between calls...
Any other pointers/hints are welcome!Thank you Dieter and anyone else who can help out!GarthOn 11/9/06, Dieter Maurer 
[EMAIL PROTECTED] wrote:Garth B. wrote at 2006-11-9 11:21 -0500:I'm sporadically getting the following error thrown as a result of a routine
I've written.InvalidObjectReference: Attempt to store a reference to an object from aseparate connection to the same database or multidatabase.This is in indication that you have introduced a persistency bug:
It is very essential that you use a persistent object onlyin the context of the ZODB connection that loaded this object.Failing to fulfill this requirement can lead to several kindsof difficult to understand errors. The one, you see above
is one such kind.Apparently, you try to store a persistent object from a connection C1as attribute of a persistent object from a different connection C2.The bug is usually introduced by storing persistent objects outside
of their connection cache -- e.g. on class level or in a module levelcache.--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] attribute used to index PDFs?

2006-02-24 Thread Garth B.
Hmm?  I must have missed where it was suggested in this old thread to
enter this issue into the bug tracker.  At any rate, what I
eventually concluded was that this really isn't an issue, just a
misconception I had about what TXNG3 actually provides as native
indexing support (given the appropriately installed converters). 
Assuming the user isn't using Plone or something else that provides a
TXNG hook into the File's data, the user still needs to write the
appropriate adapter to get the indexer to pull the raw data from the
object to then be converted and indexed.

This was a bit of a change from what I was used to with TXNG2 which
does know how to pull the data from File objects.  Since I didn't have
enough time to research what was involved in writing an adapter, I
fell back to using TXNG2.  It worked well and accomplished what I
needed.

Garth



On 2/24/06, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 12. Dezember 2005 14:54:09 -0500 Garth B. [EMAIL PROTECTED] wrote:

  On closer inspection, the Word docs aren't actually being indexed
  appropriately either.  When I browse the vocabulary for these indexed
  Word docs, I happen to see textual content that can be seen by also
  cat'ing the document to the stdout.  The vocab includes other strings
  that certainly are not content.  I guess they're string
  representations of binary content.
 
  These are other things that I noticed, maybe they won't amount to
  anything:
 
  - When I watch the processes during indexing w/top I don't see wvWare
  or pdftotext appear.  Maybe they won't.
 
  - I also inserted a couple of LOG.warn's in src/textindexng/content.py
  around line 130 (  if d.has_key('mimetype'):  ), and this test always
  fails, thereby skipping conversion.
 
  - Digging further in this file, mimetype is only defined when
  extract_content() in content.py calls icc.addBinary(...).  This only
  happens when the indexed object provides a txng_get() hook (or I
  suppose if an adapter exists).  That whole block (around lines 81 -
  93) never gets hit with my PDFs or Word docs during indexing.  When I
  index a large number of PDFs I will get a number of TypeErrors raised
  around line 110 when extract_content() notices that the data isn't a
  [unicode] string.
 
  Is the standard Zope File object supposed to expose a txng_get hook?
 
  On 12/12/05, Garth B. [EMAIL PROTECTED] wrote:
  Hi Andreas,
 
  Neither PrincipiaSearchSource nor SearchableText does anything for
  these File-type objects.  I guess nothing for SearchableText is
  expected since these are not CMF or Plone-derived objects.  The only
  way I've managed to get *anything* indexed for these File-type objects
  is by specifying the data attribute.
 
  A couple of related postings that I've found through a bit of Googling
  have also noted having to use data when indexing these kinds of
  files, for example:
  http://mail.zope.org/pipermail/zope/2003-August/139702.html
 
  So, I should be able to use PrincipiaSearchSource?  I've only used
  that for text-oriented objects like Page Templates.  I'll keep digging
  around, but I welcome any suggestions for what the problem could be or
  how I can debug this further.

 Maybe you should bring this to TXNG bugtracker (as suggested!).

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


[Zope] attribute used to index PDFs?

2005-12-12 Thread Garth B.
TextIndexNG 3.1.1
Zope 2.8.0
Python 2.3.5

What attribute should be specified when indexing PDFs?  I've been
using data.  Word docs are indexed properly, but the PDFs aren't. 
The PDFs are still found with the rest of the files, but the indexed
content is not what I expected.

To try narrow things down, I set up a seperate test Catalog with only
two PDFs.  The number of distinct values for indexing these PDFs is
around 6600 (which seems a little high for two pdfs with a combined
total of 3 pages).  In the Catalog tab of my test ZCatalog, the PDFs
are listed as type Unknown.  The content type of these PDFs are set
to application/pdf'.

(In my other ZCatalog, the PDFs and Word docs are listed as type File)

This is an excerpt from the vocabulary for f in my test Catalog's index:
-
f
f+æq
f0
f2ök
f5ô
f6
f7ëfü
fa
false
fb8aad1ed82a2cc33e9feb68a3f323
fbt
fc
fd
fdo
fe
fea
feâà
ff
fg
fgiëü
fh
fib
filter
filters
firstchar
fió
fl
flags
flatedecode
fm
fmx
fnaèh
font
fontbbox
fontdescriptor
fontfamily
fontfile2
fontname
fontstretch
fontweight
footlight
format
-
It looks as though the converter isn't doing its job, or the index
isn't recognizing the files as PDFs  I have manually run pdftotext at
the command line with each of the PDFs to see if pdftotext is having
trouble and it appears to output the textual content properly.  The
TextIndexNG Converters tab does recognize it.  Do I have a
misconfiguration somewhere?

Thanks!
___
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] attribute used to index PDFs?

2005-12-12 Thread Garth B.
Hi Andreas,

Neither PrincipiaSearchSource nor SearchableText does anything for
these File-type objects.  I guess nothing for SearchableText is
expected since these are not CMF or Plone-derived objects.  The only
way I've managed to get *anything* indexed for these File-type objects
is by specifying the data attribute.

A couple of related postings that I've found through a bit of Googling
have also noted having to use data when indexing these kinds of
files, for example:
http://mail.zope.org/pipermail/zope/2003-August/139702.html

So, I should be able to use PrincipiaSearchSource?  I've only used
that for text-oriented objects like Page Templates.  I'll keep digging
around, but I welcome any suggestions for what the problem could be or
how I can debug this further.

Garth

On 12/12/05, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 12. Dezember 2005 11:33:13 -0500 Garth B. [EMAIL PROTECTED] wrote:

  TextIndexNG 3.1.1
  Zope 2.8.0
  Python 2.3.5
 
  What attribute should be specified when indexing PDFs?  I've been
  using data.  Word docs are indexed properly, but the PDFs aren't.
  The PDFs are still found with the rest of the files, but the indexed
  content is not what I expected.

 Depends on the content-type. PrincipiaSearchSource for core Zope  types as
 File, DTML and SearchableText for any CMF or Plone content-type.

 -aj


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


Re: [Zope] attribute used to index PDFs?

2005-12-12 Thread Garth B.
On closer inspection, the Word docs aren't actually being indexed
appropriately either.  When I browse the vocabulary for these indexed
Word docs, I happen to see textual content that can be seen by also
cat'ing the document to the stdout.  The vocab includes other strings
that certainly are not content.  I guess they're string
representations of binary content.

These are other things that I noticed, maybe they won't amount to anything:

- When I watch the processes during indexing w/top I don't see wvWare
or pdftotext appear.  Maybe they won't.

- I also inserted a couple of LOG.warn's in src/textindexng/content.py
around line 130 (  if d.has_key('mimetype'):  ), and this test always
fails, thereby skipping conversion.

- Digging further in this file, mimetype is only defined when
extract_content() in content.py calls icc.addBinary(...).  This only
happens when the indexed object provides a txng_get() hook (or I
suppose if an adapter exists).  That whole block (around lines 81 -
93) never gets hit with my PDFs or Word docs during indexing.  When I
index a large number of PDFs I will get a number of TypeErrors raised
around line 110 when extract_content() notices that the data isn't a
[unicode] string.

Is the standard Zope File object supposed to expose a txng_get hook?

On 12/12/05, Garth B. [EMAIL PROTECTED] wrote:
 Hi Andreas,

 Neither PrincipiaSearchSource nor SearchableText does anything for
 these File-type objects.  I guess nothing for SearchableText is
 expected since these are not CMF or Plone-derived objects.  The only
 way I've managed to get *anything* indexed for these File-type objects
 is by specifying the data attribute.

 A couple of related postings that I've found through a bit of Googling
 have also noted having to use data when indexing these kinds of
 files, for example:
 http://mail.zope.org/pipermail/zope/2003-August/139702.html

 So, I should be able to use PrincipiaSearchSource?  I've only used
 that for text-oriented objects like Page Templates.  I'll keep digging
 around, but I welcome any suggestions for what the problem could be or
 how I can debug this further.

 Garth

 On 12/12/05, Andreas Jung [EMAIL PROTECTED] wrote:
 
 
  --On 12. Dezember 2005 11:33:13 -0500 Garth B. [EMAIL PROTECTED] wrote:
 
   TextIndexNG 3.1.1
   Zope 2.8.0
   Python 2.3.5
  
   What attribute should be specified when indexing PDFs?  I've been
   using data.  Word docs are indexed properly, but the PDFs aren't.
   The PDFs are still found with the rest of the files, but the indexed
   content is not what I expected.
 
  Depends on the content-type. PrincipiaSearchSource for core Zope  types as
  File, DTML and SearchableText for any CMF or Plone content-type.
 
  -aj
 
 

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


Re: [Zope] Adding TextIndexNG 3.1.1 error

2005-12-06 Thread Garth B.
What the heck! I get the exact same error with a fresh instance of
2.8.4!  Am I just not installing this correctly?  I've followed the
instructions in doc/README.txt.

I extract the contents of the tarball into my instance's Products directory.

I go into the extension_modules directory and run python2.3 setup.py install

It completes.  I enter a python2.3 interactive shell and can from
zopyx import txng3 without error. The libraries were installed in
/usr/local/lib/python2.3/site-packages.

This python is the same one used for this installation of Zope.

The TextIndexNG3 directory tree is accessible by the zope user.

After restarting Zope, it shows up in the Products list normally (not broken).

When trying to add a TextIndexNG3 to my ZCatalog is thows a
ComponentLookupError.

Could there be a problem with our installation of python?  It's
currently used, seemingly without trouble, in two existing
installations of Zope (different versions).  The server is running two
2.8.0 instances and one 2.8.4 instance.  This is a newly created
second 2.8.4 instance to try resolve my TextIndexNG problems.

Is there anything I can do to verify or confirm that whatever
TextIndexNG is looking for is actually broken or missing?

---
Zope Version (Zope 2.8.4-final, python 2.3.5, linux2)
Python Version 2.3.5 (#2, Jul 13 2005, 15:31:52) [GCC 3.2.3 20030502
(Red Hat Linux 3.2.3-52)]
System Platform linux2
SOFTWARE_HOME /usr/local/Zope/2.8.4-final/lib/python
ZOPE_HOME /usr/local/Zope/2.8.4-final
INSTANCE_HOME /usr/local/Zope/2.8.4-final/instances/clients
CLIENT_HOME /usr/local/Zope/2.8.4-final/instances/clients/var

---
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, 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 Products.PageTemplates.PageTemplateFile, line 110, in _exec
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - PageTemplateFile at /test/catalog/manage_addTextIndexNG3Form
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 651, in do_loop_tal
  Module Products.PageTemplates.TALES, line 206, in setRepeat
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: manage_addTextIndexNG3Form
   - Line 155, Column 8
   - Expression: standard:'context/get_splitters'
   - Names:
  {'container': App.ProductContext.__FactoryDispatcher__ object
at 0xb62658ac,
   'context': App.ProductContext.__FactoryDispatcher__ object at
0xb62658ac,
   'default': Products.PageTemplates.TALES.Default instance at 0xb6c4af0c,
   'here': App.ProductContext.__FactoryDispatcher__ object at 0xb62658ac,
   'loop': Products.PageTemplates.TALES.SafeMapping object at 0xb62290cc,
   'modules':
Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb6c5afac,
   'nothing': None,
   'options': {'args': ()},
   'repeat': Products.PageTemplates.TALES.SafeMapping object at
0xb62290cc,
   'request': HTTPRequest,
URL=http://localhost:8081/test/catalog/manage_addProduct/TextIndexNG3/manage_addTextIndexNG3Form,
   'root': Application at ,
   'template': PageTemplateFile at
/test/catalog/manage_addTextIndexNG3Form,
   'traverse_subpath': [],
   'user': admin}
  Module Products.PageTemplates.Expressions, line 185, in __call__
  Module Products.PageTemplates.Expressions, line 180, in _eval
  Module Products.PageTemplates.Expressions, line 85, in render
  Module Products.TextIndexNG3, line 49, in get_splitters
  Module zope.component, line 87, in getUtilitiesFor
  Module zope.component, line 68, in getService
  Module zope.component.service, line 109, in getService
ComponentLookupError: 'Utilities'



On 12/5/05, Garth B. [EMAIL PROTECTED] wrote:
 Sigh... figures... I'll use this as an excuse to upgrade to 2.8.4

 Thanks!

 On 12/5/05, Andreas Jung [EMAIL PROTECTED] wrote:
 
 
  --On 5. Dezember 2005 14:15:39 -0500 Garth B. [EMAIL PROTECTED] wrote:
 
   Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
   Add dropdown in my ZCatalog's Indexes tab, it immediately gives me
   this error.
 
  Works like a charm..Somehow your Zope installation must be borked.
  Try with again with a fresh 2.8 installation.
 
  -aj
 
 
 

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


[Zope] Adding TextIndexNG 3.1.1 error

2005-12-05 Thread Garth B.
Zope 2.8.0
Python 2.3.5
RHEL 3

I installed TextIndexNG 3.1.1 and associated extension_modules without
a problem.  Trying to add a TextIndexNG index to my catalog returns:

Error Type: ComponentLookupError
Error Value: 'Utilities'

I'm pretty sure I followed all instructions and I've installed and
used previous versions of TextIndexNG without a problem on other
instances of Zope 2.8.x.

Can anyone help figure out what's going wrong?  Traceback follows...

Traceback (innermost last):
  Module ZPublisher.Publish, line 113, 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 Products.PageTemplates.PageTemplateFile, line 110, in _exec
  Module Products.PageTemplates.PageTemplate, line 102, in pt_render
   - PageTemplateFile at /test/Catalog/manage_addTextIndexNG3Form
  Module TAL.TALInterpreter, line 190, in __call__
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 611, in do_loop_tal
  Module Products.PageTemplates.TALES, line 206, in setRepeat
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: manage_addTextIndexNG3Form
   - Line 155, Column 8
   - Expression: standard:'context/get_splitters'
   - Names:
  {'container': App.ProductContext.__FactoryDispatcher__ object
at 0xb64020cc,
   'context': App.ProductContext.__FactoryDispatcher__ object at
0xb64020cc,
   'default': Products.PageTemplates.TALES.Default instance at 0xb6c6bdcc,
   'here': App.ProductContext.__FactoryDispatcher__ object at 0xb64020cc,
   'loop': Products.PageTemplates.TALES.SafeMapping object at 0xb613e3cc,
   'modules':
Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb6c7ec6c,
   'nothing': None,
   'options': {'args': ()},
   'repeat': Products.PageTemplates.TALES.SafeMapping object at
0xb613e3cc,
   'request': HTTPRequest,
URL=http://localhost:8080/test/Catalog/manage_addProduct/TextIndexNG3/manage_addTextIndexNG3Form,
   'root': OFS.Application.Application object at 0xb644f32c,
   'template': PageTemplateFile at
/test/Catalog/manage_addTextIndexNG3Form,
   'traverse_subpath': [],
   'user': garth}
  Module Products.PageTemplates.Expressions, line 183, in __call__
  Module Products.PageTemplates.Expressions, line 178, in _eval
  Module Products.PageTemplates.Expressions, line 85, in render
  Module Products.TextIndexNG3, line 49, in get_splitters
  Module zope.component, line 87, in getUtilitiesFor
  Module zope.component, line 68, in getService
  Module zope.component.service, line 109, in getService
ComponentLookupError: 'Utilities'
___
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] Adding TextIndexNG 3.1.1 error

2005-12-05 Thread Garth B.
Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
Add dropdown in my ZCatalog's Indexes tab, it immediately gives me
this error.

Thanks for any help you can provide!  I'll repeat the traceback below:

Traceback (innermost last):
 Module ZPublisher.Publish, line 113, 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 Products.PageTemplates.PageTemplateFile, line 110, in _exec
 Module Products.PageTemplates.PageTemplate, line 102, in pt_render
  - PageTemplateFile at /test/Catalog/manage_addTextIndexNG3Form
 Module TAL.TALInterpreter, line 190, in __call__
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 611, in do_loop_tal
 Module Products.PageTemplates.TALES, line 206, in setRepeat
 Module Products.PageTemplates.TALES, line 221, in evaluate
  - URL: manage_addTextIndexNG3Form
  - Line 155, Column 8
  - Expression: standard:'context/get_splitters'
  - Names:
 {'container': App.ProductContext.__FactoryDispatcher__ object
at 0xb64020cc,
  'context': App.ProductContext.__FactoryDispatcher__ object at
0xb64020cc,
  'default': Products.PageTemplates.TALES.Default instance at 0xb6c6bdcc,
  'here': App.ProductContext.__FactoryDispatcher__ object at 0xb64020cc,
  'loop': Products.PageTemplates.TALES.SafeMapping object at 0xb613e3cc,
  'modules':
Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb6c7ec6c,
  'nothing': None,
  'options': {'args': ()},
  'repeat': Products.PageTemplates.TALES.SafeMapping object at
0xb613e3cc,
  'request': HTTPRequest,
URL=http://localhost:8080/test/Catalog/manage_addProduct/TextIndexNG3/manage_addTextIndexNG3Form,
  'root': OFS.Application.Application object at 0xb644f32c,
  'template': PageTemplateFile at
/test/Catalog/manage_addTextIndexNG3Form,
  'traverse_subpath': [],
  'user': garth}
 Module Products.PageTemplates.Expressions, line 183, in __call__
 Module Products.PageTemplates.Expressions, line 178, in _eval
 Module Products.PageTemplates.Expressions, line 85, in render
 Module Products.TextIndexNG3, line 49, in get_splitters
 Module zope.component, line 87, in getUtilitiesFor
 Module zope.component, line 68, in getService
 Module zope.component.service, line 109, in getService
ComponentLookupError: 'Utilities'

On 12/5/05, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 5. Dezember 2005 13:34:15 -0500 Garth B. [EMAIL PROTECTED] wrote:

  Zope 2.8.0
  Python 2.3.5
  RHEL 3
 
  I installed TextIndexNG 3.1.1 and associated extension_modules without
  a problem.  Trying to add a TextIndexNG index to my catalog returns:
 
  Error Type: ComponentLookupError
  Error Value: 'Utilities'
 

 I am still missing a detailed description from your side how to reproduce
 this behaviour on nacked Plone or Zope installation.

 -aj




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


Re: [Zope] Adding TextIndexNG 3.1.1 error

2005-12-05 Thread Garth B.
Sigh... figures... I'll use this as an excuse to upgrade to 2.8.4

Thanks!

On 12/5/05, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 5. Dezember 2005 14:15:39 -0500 Garth B. [EMAIL PROTECTED] wrote:

  Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
  Add dropdown in my ZCatalog's Indexes tab, it immediately gives me
  this error.

 Works like a charm..Somehow your Zope installation must be borked.
 Try with again with a fresh 2.8 installation.

 -aj



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


[Zope] Non-responsive objects reprise

2005-11-13 Thread Garth B.
 point Acrobat stopped complaining about corrupted PDFs.  The
siezing problem looked as though it disappeared while mod_disk_caching
was enabled.  Indeed, Watching the Apache and Zope logs showed
requests more often being fulfilled only by Apache than by Zope. 
Perhaps the proxy problems in #4 is indicative of a loaded Zope that
needs caching. We are not running ZEO or anything like that.  Perhaps
we should.
=

Apologies for the long email but I have no idea what's going on... if
ANYONE has ANY suggestions or ideas on what else I could investigate
it would be GREATLY appreciated!

Thank you!

Garth

On 8/17/05, Dieter Maurer [EMAIL PROTECTED] wrote:
 Garth B. wrote at 2005-8-16 19:21 -0400:
  ...
 When I hit an offending
 folder, I simply get no response and the browser just waits and waits.

 Visit Control_Panel -- Debug Information and check whether
 your request indeed does not finish.
 You see the active requests at the bottom of this page.

 If this page shows you, that the request was finished by Zope,
 then you hit a wide spread browser bug:

   In some cases, Zope returns an 204 (no content) response.
   For unknown reasons (and against the HTTP spec),
   most browsers treat this as continue to wait.

 If the request is not finished, you can use
 Forent's DeadlockDebugger to find out where your
 request is spinning.

 --
 Dieter

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


[Zope] Non-responsive folders

2005-08-16 Thread Garth B.
Hello everyone,

Python 2.3.4
Zope 2.7.3
Apache 2.0.46

I have a website that has been running flawlessly since late last year
sitting behind Apache using the usual rewrite rules.  I've recently
started experiencing some folders becoming non-responsive when trying
to view them (e.g. http://www.someserver.com/somefolder).  I can still
access most other folders without a problem.  When I hit an offending
folder, I simply get no response and the browser just waits and waits.
 I haven't been able to establish a pattern as to what's behind the
folders that might be causing the problem.  On a clean start the
problematic folders usually respond normally for awhile, then stop. 
So far, which folders stop responding are always the same.

Zope's event.log shows a number of the following in case it is relevant:

2005-08-16T13:50:35 ERROR(200) ZServer uncaptured python exception,
closing channel ZServer.HTTPServer.zhttp_channel connected
127.0.0.1:40850 at 0xb2b5c5ec channel#: 6014 requests:
(socket.error:(104, 'Connection reset by peer')
[/var/tmp/python2.3-2.3.4-root/usr/lib/python2.3/asynchat.py|initiate_send|218]
[/usr/local/Zope/2.7.3/lib/python/ZServer/medusa/http_server.py|send|417]
[/var/tmp/python2.3-2.3.4-root/usr/lib/python2.3/asyncore.py|send|337])

The problem occurs sporadically enough that I haven't been able to
tell whether these lines from the event.log happen in conjunction with
a non-responsive folder.

I also see the occasional ZODB conflict error.

Interestingly enough I can directly view the offending folders without
a problem if I circumvent Apache (e.g.
http://zope.someserver.com:8080/website/somefolder).  As far as I can
tell nothing has changed with my Apache configuration.

At first I thought that maybe something had gotten screwed up with my
Zope instance or data.fs (~1200MB), but since I can directly view the
offending folders without a problem by skipping Apache, I'm starting
to think otherwise.  Restarting Zope *usually* temporarily clears the
problem.

Can anyone offer any suggestions for what might be going on or what
other evidence I can look for?  As a possible solution, I'm hastily
preparing to upgrade to a more recent version of Zope, but I'd sure
like to know what's suddenly gone wrong (especially since upgrading
may not solve the problem).

Thank you!
Garth
___
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] XUF and Postgres

2005-07-15 Thread Garth B.
For what it's worth, I recently used the SimpleUserFolder for an
application that uses Postgres as the backend.  It was terrifically
easy to implement authentication through Postgres via the
SimpleUserFolder.  It does exactly what I want without unnecessary
frill or complications.

Garth


On 7/15/05, Dieter Maurer [EMAIL PROTECTED] wrote:
 David Pratt wrote at 2005-7-14 20:30 -0300:
 Thanks Dieter. I was really hoping it is a good solution since it is
 the only User Folder product for Postgres that I have seen thus far.
 
 Chris Withers would tell you, that Simple User Folder can do this
 as well :-)
 
 --
 Dieter
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope 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: Poll: Zope and Suse Linux

2005-07-08 Thread Garth B.
When installing from the source, Python does offer a make altinstall which is terrific for installing a newer or older version of Python alongside an existing installation.

For example, Fedore Core 4comes with Python 2.4 and as far as I can tell, doing amake altinstallwith the 2.3.5 tarballputs italongside 2.4 quite nicely. At any rate, I've had no problems compiling, installing and running Zope 
2.7.6 and 2.8 with it.

HTH

On 7/8/05, Paul Winkler [EMAIL PROTECTED] wrote: 
On Fri, Jul 08, 2005 at 04:01:23PM +0100, Tony Addyman wrote: Removing python-2.4 from the system is not an option. Too many thinks link 
 in to it.No need to remove anything.Just build python 2.3 and install it in /usr/local (the default).Then build zope from source like so:./configure --with-python=/usr/local/bin/python2.3 --prefix=... 
makemake installDoes that not work?I don't see why this is any different fromthe usual case of the distro-provided python or zope being too old.--Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL Methods and the SQL LIMIT clause

2005-05-12 Thread Garth B.
Assuming MySQL, I found the fix for this was to go the Advanced tab for the ZSQL Method (in the ZMI) and set Maximum Rows to Retrieve to zero.

After that, my limit clause worked without a problem.
On 5/11/05, Asad Habib [EMAIL PROTECTED] wrote:
Is there a reason why Z SQL methods do not allow the use of the LIMITclause? I am absolutely certain that my query has the right syntax since I
executed it against the MySQL server and it gave me the correct results.FYI, I have provided the query below:SELECT course_id FROM courseWHERE course_id  991000ORDER BY course_id DESC LIMIT 1
Furthermore, Zope throws the following error when I try to test this queryvia the ZMI and also when I use it in my application:(1064, You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near
'LIMIT 1000' at line 3)Any help would be appreciated. Thank you.- Asad___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-announcehttp://mail.zope.org/mailman/listinfo/zope-dev )___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with Z Psycopg

2005-04-05 Thread Garth B.
I have the same problem, but I eventually corrected it, by forcibly
closing the connection each time prior to running the queries.
Fortunately, my scenario uses page caching to reduce the number of hits
to the db so the additional effort of reopening the connection is
neglible.

I'd sure like to know what the problem is, though...

RHEL
Zope 2.7.3
Python 2.3.4
psycopg 1.1.18
PostgreSQL 7.3___
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 )