Mailing List Archive

[Zope-PTK] Yet another install failure for DemoPortal
All,

When I attempt to import DemoPortal.zexp, I get the following error:

Error Type: ImportError
Error Value: No module named ZopeOrg.PortalContent

Traceback (innermost last):
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
214, in publish_module
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
179, in publish
File /usr/local/src/Zope-2.1.3/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
165, in publish
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_importObject)
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: manage_importObject)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
482, in manage_importObject
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
232, in _setObject
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
248, in manage_afterAdd
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/ZClasses/ZClass.py, line 412,
in manage_afterAdd
(Object: Portal)
File /usr/local/src/Zope-2.1.3/lib/python/ZClasses/ZClass.py, line 373,
in _register
(Object: Portal)
File /usr/local/src/Zope-2.1.3/lib/python/ZODB/Connection.py, line 396,
in setstate
File /usr/local/src/Zope-2.1.3/lib/python/ZODB/Connection.py, line 205,
in _persistent_load
(Info: )
File /usr/local/src/Zope-2.1.3/lib/python/ZODB/Connection.py, line 147,
in __getitem__
(Info: )
ImportError: (see above)

There appear to be non-ASCII characters within the parentheses following
"Info:".

I'm wondering if this has something to do with an old ZopeOrg product that
is left over from my previous attempt at installing the packaged version
of PTK. I cannot delete this package however. This is the error I get:

Error Type: SystemError
Error Value: Failed to import class _ZClass_for_ZopeOrgPortalBase from
module Products.PTKBase

Traceback (innermost last):
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
214, in publish_module
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
179, in publish
File /usr/local/src/Zope-2.1.3/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
165, in publish
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_delObjects)
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: manage_delObjects)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
395, in manage_delObjects
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
267, in _delObject
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/ObjectManager.py, line
262, in manage_beforeDelete
(Object: ElementWithAttributes)
File /usr/local/src/Zope-2.1.3/lib/python/ZODB/Connection.py, line 396,
in setstate
SystemError: (see above)

Any suggestions?

Thanks,
Jim
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
On Mon, 7 Feb 2000, Jim Cain wrote:

> All,
>
> When I attempt to import DemoPortal.zexp, I get the following error:
>
> Error Type: ImportError
> Error Value: No module named ZopeOrg.PortalContent
>
> I'm wondering if this has something to do with an old ZopeOrg product that
> is left over from my previous attempt at installing the packaged version
> of PTK.

Quite probably. I had the same problem when trying to convert a
ZClass to use a class I had moved to a different package. If the old
package was visible, it would always use that one regardless of which I
had selected in the ZClass add form. I had no end of headaches getting it
to behave.

> I cannot delete this package however. This is the error I get:

Such as this one.

> Error Type: SystemError
> Error Value: Failed to import class _ZClass_for_ZopeOrgPortalBase from
> module Products.PTKBase
>
> Any suggestions?

The easiest thing to do (depending on your circumstances) is to start
with a fresh database. You can just delete/rename your var/Data.fs file,
and it will generate a virgin database. Let me know if that's not a
feasable solution, I'll see if I can figure out how to trick it.

Mike.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
On Mon, 7 Feb 2000, Mike Pelletier wrote:

> On Mon, 7 Feb 2000, Jim Cain wrote:
>
> > All,
> >
> > When I attempt to import DemoPortal.zexp, I get the following error:
> >
> > Error Type: ImportError
> > Error Value: No module named ZopeOrg.PortalContent
> >
> > I'm wondering if this has something to do with an old ZopeOrg product that
> > is left over from my previous attempt at installing the packaged version
> > of PTK.
>
> Quite probably. I had the same problem when trying to convert a
> ZClass to use a class I had moved to a different package. If the old
> package was visible, it would always use that one regardless of which I
> had selected in the ZClass add form. I had no end of headaches getting it
> to behave.
>
> > I cannot delete this package however. This is the error I get:
>
> Such as this one.
>
> > Error Type: SystemError
> > Error Value: Failed to import class _ZClass_for_ZopeOrgPortalBase from
> > module Products.PTKBase
> >
> > Any suggestions?
>
> The easiest thing to do (depending on your circumstances) is to start
> with a fresh database. You can just delete/rename your var/Data.fs file,
> and it will generate a virgin database. Let me know if that's not a
> feasable solution, I'll see if I can figure out how to trick it.

Okay, I rebuilt the database from scratch, which was not a big deal since
this is running on a test Zope instance.

I imported the DemoPortal and began to create a portal in my top-level
folder. On step 3 of the wizard, after clicking "Finish," I get the
following error:

Error Type: TypeError
Error Value: not enough arguments; expected 6, got 3

Traceback (innermost last):
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
214, in publish_module
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
179, in publish
File /usr/local/src/Zope-2.1.3/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
165, in publish
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: Portal_add)
File /usr/local/src/Zope-2.1.3/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: Portal_add)
File /usr/local/src/Zope-2.1.3/lib/python/OFS/DTMLMethod.py, line 145,
in __call__
(Object: Portal_add)
File /usr/local/src/Zope-2.1.3/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: Portal_add)
File /usr/local/src/Zope-2.1.3/lib/python/DocumentTemplate/DT_With.py,
line 148, in render
(Object: Portal.createInObjectManager(REQUEST['id'], REQUEST))
File /usr/local/src/Zope/lib/python/Products/PTKDemo/Portal.py, line 56,
in install
(Object: DemoPortalBase)
TypeError: (see above)

I'm getting closer, a little at a time. :-)

Jim
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
On Mon, 7 Feb 2000, Jim Cain wrote:

> I imported the DemoPortal and began to create a portal in my top-level
> folder. On step 3 of the wizard, after clicking "Finish," I get the
> following error:
>
> Error Type: TypeError
> Error Value: not enough arguments; expected 6, got 3

> File /usr/local/src/Zope/lib/python/Products/PTKDemo/Portal.py, line 56, in install
> (Object: DemoPortalBase)
> TypeError: (see above)
>
> I'm getting closer, a little at a time. :-)

Hmm. In Portal.py (rev 1.31), this is the line:

catalog.manage_addIndex('review_state', 'FieldIndex')

This is the first line that an index is added. Some people reported
that ZCatalog doesn't even have a manage_addIndex method in their version,
so I have changed this to add indexes and columns differently. The change
was made yesterday sometime. I can't imagine why it would be expecting 6
parameters in any case.

Try updating to the latest version (run 'cvs up' in each of PTKBase
and PTKDemo) and trying again. Let me know!

Thanks!
Mike.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
Mike Pelletier wrote:
>
> On Mon, 7 Feb 2000, Jim Cain wrote:
>
> > I imported the DemoPortal and began to create a portal in my top-level
> > folder. On step 3 of the wizard, after clicking "Finish," I get the
> > following error:
> >
> > Error Type: TypeError
> > Error Value: not enough arguments; expected 6, got 3
>
> > File /usr/local/src/Zope/lib/python/Products/PTKDemo/Portal.py, line 56, in install
> > (Object: DemoPortalBase)
> > TypeError: (see above)
> >
> > I'm getting closer, a little at a time. :-)
>
> Hmm. In Portal.py (rev 1.31), this is the line:
>
> catalog.manage_addIndex('review_state', 'FieldIndex')
>
> This is the first line that an index is added. Some people reported
> that ZCatalog doesn't even have a manage_addIndex method in their version,
> so I have changed this to add indexes and columns differently. The change
> was made yesterday sometime. I can't imagine why it would be expecting 6
> parameters in any case.
>
> Try updating to the latest version (run 'cvs up' in each of PTKBase
> and PTKDemo) and trying again. Let me know!
>
> Thanks!
> Mike.

I see the same problem:

* I just fetched the whole PTK module via 'cvs -d ... co ZopePTK'.

* I linked PTKBase and PTKDemo into my Products tree via 'ln -s'
and restarted -- both show up fine in the Control Panel.

* I linked DemoPortal.zexp into the /import directory, and imported it;
the Help class and the PortalWizard showed up borken.

* I restarted Zope -- the PortalWizard class is now not broken. I
switched to the main tree and tried to create a Portal. I filled out the
three forms, hit the Finish button (why not the Swedish button? or the
Latt button? :) and got the same "expected 6, got 3" TypeError reported
by Jim Cain.

Running Zope 2.1.3 on a RH5.2 Linux box.
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
Mike Pelletier wrote:
>
> On Mon, 7 Feb 2000, Jim Cain wrote:
>
> > I imported the DemoPortal and began to create a portal in my top-level
> > folder. On step 3 of the wizard, after clicking "Finish," I get the
> > following error:
> >
> > Error Type: TypeError
> > Error Value: not enough arguments; expected 6, got 3
>
> > File /usr/local/src/Zope/lib/python/Products/PTKDemo/Portal.py, line 56, in install
> > (Object: DemoPortalBase)
> > TypeError: (see above)
> >
> > I'm getting closer, a little at a time. :-)
>
> Hmm. In Portal.py (rev 1.31), this is the line:
>
> catalog.manage_addIndex('review_state', 'FieldIndex')
>
> This is the first line that an index is added. Some people reported
> that ZCatalog doesn't even have a manage_addIndex method in their version,
> so I have changed this to add indexes and columns differently. The change
> was made yesterday sometime. I can't imagine why it would be expecting 6
> parameters in any case.

manage_addIndex() in my version of ZCatalog.py looks like::

def manage_addIndex(self, name, type, REQUEST, RESPONSE, URL1):

The method just calls 'RESPONSE.redirect()' blindly, without checking that
anything reasonable was passed (ugh!). Which version of Zope are you testing
with?

>
> Try updating to the latest version (run 'cvs up' in each of PTKBase
> and PTKDemo) and trying again. Let me know!

No good :( -- see my other post. Here is a patch which fixes it:

[zope@silver PTKDemo]$ cvs diff -c
cvs server: Diffing .
Index: Portal.py
===================================================================
RCS file: /cvs-repository/ZopePTK/PTKDemo/Portal.py,v
retrieving revision 1.1
diff -c -r1.1 Portal.py
*** Portal.py 2000/02/04 22:35:05 1.1
--- Portal.py 2000/02/08 00:12:59
***************
*** 53,72 ****
self._setObject(id, catalog)
catalog = self.SiteIndex
# Reviewing indexes
! catalog.manage_addIndex('review_state', 'FieldIndex')
! catalog.manage_addIndex('Date', 'FieldIndex')
# Content indexes
! catalog.manage_addIndex('Creator', 'FieldIndex')
! catalog.manage_addIndex('Title', 'TextIndex')
! catalog.manage_addIndex('Description', 'TextIndex')
! catalog.manage_addIndex('Searchable Text', 'TextIndex')
# Catalog meta-data
! catalog.manage_addColumn('Title')
! catalog.manage_addColumn('Description')
! catalog.manage_addColumn('review_state')
! catalog.manage_addColumn('Creator')
! catalog.manage_addColumn('Date')
! catalog.manage_addColumn('icon')

# Create roles
self._addRole('Member')
--- 53,72 ----
self._setObject(id, catalog)
catalog = self.SiteIndex
# Reviewing indexes
! catalog._catalog.addIndex('review_state', 'FieldIndex')
! catalog._catalog.addIndex('Date', 'FieldIndex')
# Content indexes
! catalog._catalog.addIndex('Creator', 'FieldIndex')
! catalog._catalog.addIndex('Title', 'TextIndex')
! catalog._catalog.addIndex('Description', 'TextIndex')
! catalog._catalog.addIndex('Searchable Text', 'TextIndex')
# Catalog meta-data
! catalog._catalog.addColumn('Title')
! catalog._catalog.addColumn('Description')
! catalog._catalog.addColumn('review_state')
! catalog._catalog.addColumn('Creator')
! catalog._catalog.addColumn('Date')
! catalog._catalog.addColumn('icon')

# Create roles
self._addRole('Member')

--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com
Re: [Zope-PTK] Yet another install failure for DemoPortal [ In reply to ]
On Mon, 7 Feb 2000, Mike Pelletier wrote:

> On Mon, 7 Feb 2000, Jim Cain wrote:
>
> > I imported the DemoPortal and began to create a portal in my top-level
> > folder. On step 3 of the wizard, after clicking "Finish," I get the
> > following error:
> >
> > Error Type: TypeError
> > Error Value: not enough arguments; expected 6, got 3
>
> > File /usr/local/src/Zope/lib/python/Products/PTKDemo/Portal.py, line 56, in install
> > (Object: DemoPortalBase)
> > TypeError: (see above)
> >
> > I'm getting closer, a little at a time. :-)
>
> Hmm. In Portal.py (rev 1.31), this is the line:
>
> catalog.manage_addIndex('review_state', 'FieldIndex')
>
> This is the first line that an index is added. Some people reported
> that ZCatalog doesn't even have a manage_addIndex method in their version,
> so I have changed this to add indexes and columns differently. The change
> was made yesterday sometime. I can't imagine why it would be expecting 6
> parameters in any case.
>
> Try updating to the latest version (run 'cvs up' in each of PTKBase
> and PTKDemo) and trying again. Let me know!

I finally got a chance to do this, and I was able to create a portal with
no problems. Now if I can just find some time to play with it. :-)

Jim