Error caused by product no longer installed

I am trying to use collective.emailconfirmationregistration on a site. I previously used it, then unloaded it.

I want to use it again, so I

  1. added to buildout, ran, all went fine
  2. get this error..
  3. the referenced blog tool not installed (may have been at one time

Traceback (innermost last):
Module ZPublisher.Publish, line 146, in publish
Module Zope2.App.startup, line 301, in commit
Module transaction._manager, line 89, in commit
Module transaction._transaction, line 329, in commit
Module transaction._transaction, line 443, in _commitResources
Module ZODB.Connection, line 567, in commit
Module ZODB.Connection, line 623, in _commit
Module ZODB.Connection, line 658, in _store_objects
Module ZODB.serialize, line 422, in serialize
Module ZODB.serialize, line 431, in _dump
PicklingError: Can't pickle <class 'collective.blog.interfaces.ICollectiveBlogLayer'>: import of module collective.blog.interfaces failed

=====================
I see the issue is collective.blog and At one time I may have had collective.blog installed to test; however, it is not in the addons, nor in the buildut.
Why would this happen and how do I fix it?
Thanks

Some existing persistent object is still holding a reference to collective.blog.interfaces (as you can read clearly from the traceback). In this case you need to take the Python debugger and sniff into the _dump() or _serialize() method of the ZODB for figuring out the offending persistent object(s).

-aj

I recommend to use the tool https://pypi.python.org/pypi/wildcard.fixpersistentutilities/ fit fixing it

1 Like

Hi, thanks for the tip on the utility tool

  1. I installed wildcard.fixpersistentutilities 1.1b7.
    looking at bin/buildout it got the tool and there were no errors reported

  2. my site is P5 and this tool hasn't been updated in 3 years, so may not be
    p5 compatible.

  3. the product did not appear in 'add-ins' (not sure if supposed to)

  4. I appended the /@@fix-persistent-utilities and got the following errors

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

Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module wildcard.fixpersistentutilities.views, line 172, in call
Module Products.Five.browser.pagetemplatefile, line 125, in call
Module Products.Five.browser.pagetemplatefile, line 59, in call
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 93, in call
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module 9ae62d35fdd660c560f0d530765c488e.py, line 652, in render
Module wildcard.fixpersistentutilities.views, line 199, in remove_utility_reg_url
Module wildcard.fixpersistentutilities.views, line 185, in utility_reg_data
Module base64, line 53, in b64encode
TypeError: must be string or buffer, not getset_descriptor

  • Expression: "python: view.remove_utility_reg_url(adapter[0], 'adapters', item[0], item[1])"
  • Filename: ... ard/fixpersistentutilities/templates/manage-utilities.pt
  • Location: (line 64: col 46)
  • Source: ... python: view.remove_utility_reg_url(adapter[0], 'adapters', item[0], item[1]) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: default: <object - at 0x7f79b88f0540>
    repeat: {...} (0)
    template: <ViewPageTemplateFile - at 0x8846b50>
    views: <ViewMapper - at 0x8f44a90>
    modules: <instance - at 0x13a8050>
    args: <tuple - at 0x7f79b892d050>
    utilities: {...} (3)
    here: <ImplicitAcquisitionWrapper LWHS_Boosters at 0x879d870>
    user: <ImplicitAcquisitionWrapper - at 0x5e36e60>
    nothing: <NoneType - at 0x7f79b872ef00>
    container: <ImplicitAcquisitionWrapper LWHS_Boosters at 0x879d870>
    adapter: <tuple - at 0x83dc290>
    request: <instance - at 0x9113b48>
    wrapped_repeat: <SafeMapping - at 0x90d26d8>
    traverse_subpath: <list - at 0x9113908>
    item: <tuple - at 0x8d4d7a0>
    loop: {...} (3)
    context: <ImplicitAcquisitionWrapper LWHS_Boosters at 0x879d870>
    view: <FixPersistentUtilities fix-persistent-utilities at 0x8f444d0>
    translate: <function translate at 0x8f2c2a8>
    root: <ImplicitAcquisitionWrapper Zope at 0x88407d0>
    options: {...} (1)
    target_language: <NoneType - at 0x7f79b872ef00>

The package probably has a custom uninstall profile that needs to be run before it is removed from buildout.

did you try
http://localhost:8080/@@fix-persistent-utilities
or just:
http://localhost:8080/site/@@fix-persistent-utilities

PS: It is not supposed to 'be installed' (your question 3 )

hi, it's not a local install. I tried anyway and got 'not found"

In plain English: you probably removed collective.blog from buildout without uninstalling it first (from ZMI's portal_quickinstaller or /prefs_install_products_form). You should never do that.

The simplest solution would be to re-add collective.blog (or whatever it's called) to your buildout, re-run buildout, uninstall it, then remove it from buildout again.

That's if you can still install it.

The tip about wildcard.fixpersistentutilities is good if you can no longer add the product to buildout, or the products folder, or whatnot. Especially good for products that misbehave and register themselves in ways that can not be uninstalled, such as the wretched Plone4Artists suite of junk.

thanks all for the suggestions.

@fulv proved to be the easiest for me. I was lucky that the collective.blog installed when I added to buildout and ran. then added and removed the addin.

thanks all