[ZCM] [ZC] 1978/ 4 Comment "bad mount call"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Dec 20 07:46:03 EST 2005


Issue #1978 Update (Comment) "bad mount call"
 Status Pending, Database/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1978

==============================================================
= Comment - Entry #4 by tseaver on Dec 20, 2005 7:46 am

> = Comment - Entry #3 by suvit on Dec 20, 2005 4:45 am
> 
> I think this is a dublicate of my #1819

Nope.  http://www.zope.org/Collectors/Zope/1819 is about a
problem in SimpleTrailblazer;  this one is in CustomTrailblazer.

The OP replied in private mail:

>==============================================================
> = Comment - Entry #2 by tseaver on Dec 19, 2005 9:08 pm
> 
> What do you have configured as the 'container-class' for that
> database / mount point?  It must be a class with an '__init__'
> taking a single non-default argument (like OFS.Folder.Folder, the
> default) or else a function taking a single argument;  in either
> case, the caller expects to supply this argument (the "id" of the
> new object).

container-class Products.CMFPlone.CatalogTool.CatalogTool


I'm trying to remember how container-class is used, but have a
sense that it does *not* have to be the same as the class of the
object you want to mount *over* the container.

At any rate, classes or functions which do not take a parameter
may *not* be used for the 'container-class'.
________________________________________
= Comment - Entry #3 by suvit on Dec 20, 2005 4:45 am

I think this is a dublicate of my #1819
________________________________________
= Comment - Entry #2 by tseaver on Dec 19, 2005 9:08 pm

What do you have configured as the 'container-class' for that
database / mount point?  It must be a class with an '__init__'
taking a single non-default argument (like OFS.Folder.Folder, the
default) or else a function taking a single argument;  in either
case, the caller expects to supply this argument (the "id" of the
new object).

If the class you want to use can't take such an argument, then
you can create a "factory" function which constructs the object,
without it.  Note that if the object doesn't know its own ID,
a number of Bad Things (TM) may occur (a broken 'absolute_url' is
the most obvious).

Close this in a month if no feedback follows, or if the configured
object does not (as I suspect) conform to the "folderish
constructor" interface.
________________________________________
= Request - Entry #1 by Anonymous User on Dec 19, 2005 4:54 pm

When trying to add a ZODB mountpoint I get the traceback below. I'm probably doing something wrong here, but this definitely looks like a coding error as well.


  	
Site Error

An error was encountered while publishing this resource.

TypeError
Sorry, a site error occurred.

Traceback (innermost last):

    * Module ZPublisher.Publish, line 187, in publish_module_standard
    * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish
    * Module ZPublisher.Publish, line 144, in publish
    * Module Zope2.App.startup, line 199, in zpublisher_exception_hook
    * Module ZPublisher.Publish, line 113, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 40, in call_object
    * Module Products.ZODBMountPoint.MountedObject, line 295, in manage_addMounts
    * Module Products.ZODBMountPoint.Mount, line 128, in _test
    * Module Products.ZODBMountPoint.Mount, line 96, in _getOrOpenObject
    * Module Products.ZODBMountPoint.MountedObject, line 195, in _traverseToMountedRoot
    * Module Products.ZODBMountPoint.MountedObject, line 76, in traverseOrConstruct
    * Module Products.ZODBMountPoint.MountedObject, line 104, in _construct

TypeError: __init__() takes exactly 1 argument (2 given) (Also, an error occurred while attempting to render the standard error message.)

Troubleshooting Suggestions

    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to error log.

If the error persists please contact the site maintainer. Thank you for your patience.

==============================================================



More information about the Zope-Collector-Monitor mailing list