Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll' #2228

Closed
zopyx opened this issue Nov 30, 2017 · 66 comments · Fixed by #2840 or zopefoundation/Products.GenericSetup#64

Comments

@zopyx
Copy link
Member

zopyx commented Nov 30, 2017

The following error is raised in Plone 5.1 when you try to install a new Plone site with an add-on where the Dexterity content-class could not be imported properly e.g. for some NameError in my case.

In particular this error message shadows the primary problem. It seems to me that some errors in the bootstrapping phase of Plone or inside of GS are just swallowed.

2017-11-30 11:29:03 ERROR txn.140599418205952 Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7fdfddecbd50>
Traceback (most recent call last):
  File "/home/ajung/.buildout/eggs/transaction-2.1.2-py2.7.egg/transaction/_transaction.py", line 514, in abort
    rm.abort(self)
  File "/home/ajung/.buildout/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/indexing.py", line 321, in tpc_abort
    self.queue.abort()
  File "/home/ajung/.buildout/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/indexing.py", line 237, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/.buildout/eggs/zope.interface-4.4.2-py2.7-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
@jensens
Copy link
Member

jensens commented Feb 6, 2018

I had the same error here, but with different preconditions.

  • I registered a custom IIndexQueueProcessor as a local component utility.
  • I had a typo in the path given at factory="...", so this was a non existent path.
  • There were no error while registering the local component.
  • A lookup of the local utility returned a <PloneSite at /Plone>.
  • Even the resulting AttributeError (because the begin method was not found was then masked similar to what @zopyx found above.

The bug is, for some reason local component registration just registers something (Plone Site object) instead of raising an exception if the dotted path does not exist.

@ida
Copy link

ida commented Mar 29, 2018

Update: This is not reproducible anymore with Plone-5.1.2.1


Had exactly the same error as reported above in a Plone-5.1.0.1, when installing an add-on via the add-site-advanced-form, but not when installing it after site-creation. The cause in my case was a portlet-assignment to a portlet-manager of Products.ContentWellPortlets via a GenericSetup-profile.

Steps to reproduce:
In an add-on's profile add 'portlets.xml' with these lines:

    <?xml version ="1.0"?>
    <portlets>
    <assignment name="top" category="context" key="/"
    manager="ContentWellPortlets.InHeaderPortletManager1"
    type="plone.portlet.static.Static" visible="True">
     </assignment>
    </portlets>

And install it along a site-creation, using "Advanced configuration".

@zopyx zopyx added this to the Plone 5.1 milestone Apr 11, 2018
@zopyx
Copy link
Member Author

zopyx commented Apr 11, 2018

This issue should be fixed before 5.1.2.
It is nearly impossible to use 5.1.2 with add-ons - neither as integrator nor as Plone user.
Unfortunately there is zero indication from the logs what the actual problem is causing this followup error.

@zopyx
Copy link
Member Author

zopyx commented Apr 11, 2018

Marked as blocker since this must be fixed before further releases.

@mauritsvanrees
Copy link
Member

So is this when installing an add-on in the add-ons control panel? Or only when selecting extra add-ons to install while creating a site?
In the last case, I wonder if it would help to add import transaction; transaction.commit() after creating the Plone Site and before applying any extra add-on profiles. So right before this line: https://github.com/plone/Products.CMFPlone/blob/5.1.2/Products/CMFPlone/factory.py#L166
Could you try that @zopyx ?

@ida
Copy link

ida commented Apr 12, 2018

@mauritsvanrees It only happens when selecting extra add-ons to install when creating a site. It does not happen when installing after site-creation via the add-ons control-panel or the ZMI's portal_quickinstaller.

Tried your suggestion and it does resolve the error in my case.

Frankly, I have no idea what's happening and avoid adapters in general, even more so because there was never a need for them amongst the use-cases I realized, and additionally ran into a non-reproducible(!) error, seemingly deriving of an adapter's persistent registry, some ages ago.

@mauritsvanrees
Copy link
Member

With a transaction.commit() before installing add-ons, the above AttributeError lookupAll goes away, but the underlying error (in Ida's case a ComponentLookupError for a portlet class) is still there. It only isn't drowned out by dozens of the same AttributeErrors in development. And when installing via the add-ons control panel, the underlying error is still there.

So the transaction.commit() doesn't really solve anything.

Technically, it could be 'fixed' in CMFCore/indexing.py:

    def abort(self):
        sm = getSiteManager()
        try:
            # We need to iterate over the utilities.
            utils = list(sm.getUtilitiesFor(IIndexQueueProcessor))
        except AttributeError:
            pass
        for name, util in utils:
            util.abort()
        self.clear()

But that is also a workaround, for a transaction abort that seems to only happen when there is an error in an add-on that is being installed via the advanced site add form.

@ida
Copy link

ida commented May 14, 2018

@mauritsvanrees thanks a lot for the investigations. I wonder if would be possible to re-use parts of the working after-site-creation-form within the on-site-creation-form. Theoretically it should. And could be of benefit, in terms of reducing redundancy and less work for maintaining. Practically it might open up one or another can. [Placeholder for thinking-face-emoji]

@mauritsvanrees
Copy link
Member

What do you mean with the 'working after-site-creation-form'? Do you mean the add-on form within the Site Setup?
Basically that is what the advanced site-creation form currently is.

Problem here is that a transaction abort fails, maybe because too much has been aborted already (so that the site manager does not work properly) for this particular abort to work... A fix in CMFCore/indexing.py might actually not be such a bad idea, although I see that my quick code above needs to be adjusted a bit to work.
But it still seems that it should maybe be possible to avoid that sm.getUtilitiesFor gets broken in the first place.

There are a bit too many possible angles to take here. But at least someone searching for a problem like this might end up in this issue report, and get some ideas of where to look.

@ida
Copy link

ida commented May 14, 2018

Yes meant that form, wasn't aware it is reused already. Thought each form has it own solution and therein lies the difference. Agree the fix should be where the cause of the errors lies.
BTW, from my side no urgency in fixing.

@mauritsvanrees
Copy link
Member

Well, they don't share code, so it is not code reuse. But the basic functionality of both is the same: call portal_setup.runAllImportStepsFromProfile on a profile. It's just that the advanced site creation form does this for various profiles at once.
The most logical way to make them more the same is to do a transaction.commit in between, and Andreas does not like the implications, and he has a good point there.

@ida
Copy link

ida commented May 15, 2018

Didn't mean that a transaction.commit would be recommendable, was just agreeing with you all the way, that your fix in CMFCore/indexing.py is a feasible solution, yet it's always better to fix the root of the cause, however that solution may look. Cheers, Ida

@mauritsvanrees
Copy link
Member

By coincidence I saw another similar bug I reported a couple of weeks ago, in this case during test setup of Products.Poi in Plone 5.1: collective/Products.Poi#44

@zopyx
Copy link
Member Author

zopyx commented Aug 6, 2018

@hvelarde why did you removed the "high" flag? This issue is a major and blocker and it must be resolved before the next release (5.1.3).

@mauritsvanrees
Copy link
Member

This bug now has labels '11 prio: blocker' and '12 prio: high'. I think that is why Hector removed one of them: there is no sense in having two priority labels.
It looks like you two agree that this is a blocker. :-)

Now if someone would have a good idea on what the real underlying problem is, that would be very helpful.

@zopyx
Copy link
Member Author

zopyx commented Aug 6, 2018

My workaround for this issue (in context of using plone.restapi for migration and my own browser view for provisioning a Plone site) is to create plain Plone website using addPloneSite() first and then installing all dependencies after that using portal_quickinstaller.installProducts([products]).

@jensens
Copy link
Member

jensens commented Aug 6, 2018

Indeed, "blocker" is more than "high". For an explanation of the labels please read https://docs.google.com/spreadsheets/d/1IQ73bSQ10b0pwoUFn0u8SE4epDdvwjhTiYTDyPAhx7A/edit#gid=0

@zopyx
Copy link
Member Author

zopyx commented Aug 6, 2018

blocker or high...I would love that the release management considers a blocker as a blocker instead of ignoring them

@jensens jensens reopened this Oct 12, 2018
@zopyx
Copy link
Member Author

zopyx commented Oct 23, 2018

Why was 5.1.4 released with this blocker?

@zopyx
Copy link
Member Author

zopyx commented Oct 23, 2018

Minimal buildout for failing Plone 5.1.4: https://github.com/zopyx/failing-plone

@zopyx
Copy link
Member Author

zopyx commented Oct 23, 2018

https://github.com/zopyx/failing-plone works on MacOS - weird

@jensens
Copy link
Member

jensens commented Oct 23, 2018

Your buildout works here on a very customized Ubuntu 14.04. Also tried with Multilingual using advanced=1. Works.

@pnicolli
Copy link

I can confirm the failing-plone buildout works for me on MacOS 10.14, python 2.7.15

@zopyx
Copy link
Member Author

zopyx commented Oct 23, 2018

Interesting observation: the error is reproducible with latest Ubuntu and FC26 where we use a shared eggs-directory. Both machines are pretty fresh and the eggs cache is also pretty new. Running the instance from a buildout with local egg-cache (eggs-directory=eggs) then I do not see the error. I also verified the issues with a system Python vs. self-compiled Python which makes no difference. This is unlikely a local problem (two different machines, two different OSes) however the different behaviour with local vs. global eggs cache appears more than weird.

@jensens
Copy link
Member

jensens commented Oct 23, 2018

I have a global egg cache here configured in my ~/.buildout/default.cfg and it works.

@mauritsvanrees
Copy link
Member

As far as I understand, this is not a problem in Plone. It is a problem in GenericSetup that hides the underlying problem. And the underlying problem is an add-on that lists a non-existing dependency profile. Installing the add-on in the add-ons control panel would fail. Installing it in the advanced add-plone-site also fails, but sadly in a non-helpful way.

So something that should fail, now fails in an unclear way. I would not call this a blocker.
But sure, it should be fixed.

Onwards:

@zopyx
Copy link
Member Author

zopyx commented Nov 19, 2018

Using the current GS master does not make a difference.

@pbauer
Copy link
Member

pbauer commented Apr 13, 2019

I cannot reproduce the issue. https://github.com/zopyx/failing-plone works fine. Even which eggs-directory=eggs. Please provide steps how to reproduce the issue.

@petschki
Copy link
Member

petschki commented Apr 15, 2019

I just gave the original issue (not the buildout thing) a quick shot on latest coredev/py3.7 and there's still an error page and a traceback in the log. I just added a typo in an addons registry.xml and tried to install it during site creation:

2019-04-15 12:00:56,886 ERROR   [waitress:339][waitress] Exception when serving /@@plone-addsite
Traceback (most recent call last):
  File "/Volumes/WORKSPACE/.buildout/eggs/zope.dottedname-4.3-py3.7.egg/zope/dottedname/resolve.py", line 43, in resolve
    found = getattr(found, n)
AttributeError: module 'collective.easyform.browser' has no attribute 'controlpanels'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/Volumes/WORKSPACE2/coredev52multipy/src/Products.CMFPlone/Products/CMFPlone/browser/admin.py", line 273, in __call__
    portal_timezone=form.get('portal_timezone', 'UTC')
  File "/Volumes/WORKSPACE2/coredev52multipy/src/Products.CMFPlone/Products/CMFPlone/factory.py", line 167, in addPloneSite
    'profile-%s' % extension_id)
  File "/Volumes/WORKSPACE/.buildout/eggs/Products.GenericSetup-2.0b6-py3.7.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/Volumes/WORKSPACE/.buildout/eggs/Products.GenericSetup-2.0b6-py3.7.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/Volumes/WORKSPACE/.buildout/eggs/Products.GenericSetup-2.0b6-py3.7.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/Volumes/WORKSPACE2/coredev52multipy/src/plone.app.registry/plone/app/registry/exportimport/handler.py", line 79, in importRegistry
    importer.importDocument(body)
  File "/Volumes/WORKSPACE2/coredev52multipy/src/plone.app.registry/plone/app/registry/exportimport/handler.py", line 127, in importDocument
    self.importRecords(node)
  File "/Volumes/WORKSPACE2/coredev52multipy/src/plone.app.registry/plone/app/registry/exportimport/handler.py", line 362, in importRecords
    interface = resolve(interfaceName)
  File "/Volumes/WORKSPACE/.buildout/eggs/zope.dottedname-4.3-py3.7.egg/zope/dottedname/resolve.py", line 45, in resolve
    __import__(used)
ModuleNotFoundError: No module named 'collective.easyform.browser.controlpanels'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/WORKSPACE/.buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 336, in service
    task.service()
  File "/Volumes/WORKSPACE/.buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 175, in service
    self.execute()
  File "/Volumes/WORKSPACE/.buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 452, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/Volumes/WORKSPACE/.buildout/eggs/Paste-3.0.8-py3.7.egg/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/httpexceptions.py", line 30, in __call__
    return self.application(environ, start_response)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Volumes/WORKSPACE/.buildout/eggs/Zope-4.0b10-py3.7.egg/ZPublisher/WSGIPublisher.py", line 183, in transaction_pubevents
    tm.abort()
  File "/Volumes/WORKSPACE/.buildout/eggs/transaction-2.4.0-py3.7.egg/transaction/_manager.py", line 255, in abort
    return self.manager.abort()
  File "/Volumes/WORKSPACE/.buildout/eggs/transaction-2.4.0-py3.7.egg/transaction/_manager.py", line 136, in abort
    return self.get().abort()
  File "/Volumes/WORKSPACE/.buildout/eggs/transaction-2.4.0-py3.7.egg/transaction/_transaction.py", line 529, in abort
    reraise(t, v, tb)
  File "/Volumes/WORKSPACE/.buildout/eggs/transaction-2.4.0-py3.7.egg/transaction/_compat.py", line 50, in reraise
    raise value
  File "/Volumes/WORKSPACE/.buildout/eggs/transaction-2.4.0-py3.7.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/Volumes/WORKSPACE/.buildout/eggs/Products.CMFCore-2.4.0b6-py3.7.egg/Products/CMFCore/indexing.py", line 321, in tpc_abort
    self.queue.abort()
  File "/Volumes/WORKSPACE/.buildout/eggs/Products.CMFCore-2.4.0b6-py3.7.egg/Products/CMFCore/indexing.py", line 237, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/Volumes/WORKSPACE/.buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.13-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'

Maybe we should catch addon installation during site creation generally in the @@plone-addsite and try to give a human readable error what happened and why the plone site could not be after the plone site has been created...

@zopyx
Copy link
Member Author

zopyx commented May 23, 2019

The very same issues continues to exist in Plone 5.2RC3 in its original form.

https://github.com/zopefoundation/Products.PythonScripts/issues/32 causes this myriade of error mesages:


  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,852 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37b828>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,852 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37b7c8>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,853 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37b9a8>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,853 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37b8e8>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,854 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37b468>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,855 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37ba08>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,855 ERROR   [txn.139952276600576:520][waitress] Failed to abort resource manager: <Products.CMFCore.indexing.QueueTM object at 0x7f492c37bca8>
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'
2019-05-23 13:15:10,857 ERROR   [waitress:339][waitress] Exception when serving /create-demo-site
Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 142, in transaction_pubevents
    yield
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 229, in publish
    bind=1)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 57, in call_object
    return obj(*args)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/src/ugent.policy/ugent/policy/browser/setup.py", line 35, in create_site
    qi.installProducts([product])
  File "<string>", line 3, in installProducts
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/AccessControl-4.0b6-py3.6-linux-x86_64.egg/AccessControl/requestmethod.py", line 85, in _curried
    return callable(*args, **kw)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 710, in installProducts
    omitSnapshots=omitSnapshots
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFQuickInstallerTool-4.0.0-py3.6.egg/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 626, in installProduct
    blacklisted_steps=blacklistedSteps,
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 393, in runAllImportStepsFromProfile
    dependency_strategy=dependency_strategy)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1465, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/tool.py", line 1277, in _doRunImportStep
    return handler(context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/exportimport/workflow.py", line 128, in importWorkflowTool
    importObjects(tool, '', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 890, in importObjects
    importObjects(sub, path + '/', context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.GenericSetup-2.0b6-py3.6.egg/Products/GenericSetup/utils.py", line 886, in importObjects
    importer.body = body
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 92, in _importBody
    self.environ)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 981, in _initDCWorkflow
    _initDCWorkflowScripts(workflow, scripts, context)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.DCWorkflow-2.4.0b2-py3.6.egg/Products/DCWorkflow/exportimport.py", line 1150, in _initDCWorkflowScripts
    script.write(file)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.PythonScripts-4.6-py3.6.egg/Products/PythonScripts/PythonScript.py", line 415, in write
    m = _nonempty_line.search(text, st)
TypeError: cannot use a string pattern on a bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/waitress-1.2.1-py3.6.egg/waitress/channel.py", line 336, in service
    task.service()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/waitress-1.2.1-py3.6.egg/waitress/task.py", line 175, in service
    self.execute()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/waitress-1.2.1-py3.6.egg/waitress/task.py", line 452, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Paste-3.0.8-py3.6.egg/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/httpexceptions.py", line 30, in __call__
    return self.application(environ, start_response)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 295, in publish_module
    response = _publish(request, new_mod_info)
  File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Zope-4.0b10-py3.6.egg/ZPublisher/WSGIPublisher.py", line 183, in transaction_pubevents
    tm.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_manager.py", line 255, in abort
    return self.manager.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_manager.py", line 136, in abort
    return self.get().abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 529, in abort
    reraise(t, v, tb)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_compat.py", line 50, in reraise
    raise value
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/transaction-2.4.0-py3.6.egg/transaction/_transaction.py", line 515, in abort
    rm.abort(self)
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 323, in tpc_abort
    self.queue.abort()
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.6.egg/Products/CMFCore/indexing.py", line 239, in abort
    for name, util in sm.getUtilitiesFor(IIndexQueueProcessor):
  File "/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.interface-4.6.0-py3.6-linux-x86_64.egg/zope/interface/registry.py", line 290, in getUtilitiesFor
    for name, utility in self.utilities.lookupAll((), interface):
AttributeError: 'PersistentAdapterRegistry' object has no attribute 'lookupAll'

@jensens
Copy link
Member

jensens commented May 23, 2019

So, the fix with failing add-ons, we finally added, results in:

  • site is created w/o addon,
  • portal message with error (or warning?) is displayed after creation.
  • all exceptions are all logged.

Latter is what you posted. What's missing?

@zopyx
Copy link
Member Author

zopyx commented May 23, 2019

Tr

So, the fix with failing add-ons, we finally added, results in:

  • site is created w/o addon,
  • portal message with error (or warning?) is displayed after creation.
  • all exceptions are all logged.

Latter is what you posted. What's missing?

True when you create Plone site through the web. But my observation is true when you use addPloneSite from a browser view or a script creating the site.

@zopyx
Copy link
Member Author

zopyx commented May 23, 2019

The new behavior is also weird and does not make sense.

I created a new site with a policy package throwing this mentioned error. Plone now says that the policy package could not be installed but it installed all its dependencies specified in metadata.xml. Sorry but this is completely odd. If I can not install the main policy package then Plone must not install any dependencies. This is broken.

@mauritsvanrees
Copy link
Member

True when you create Plone site through the web. But my observation is true when you use addPloneSite from a browser view or a script creating the site.

In what way is the result different than when creating a Plone site through the web? From a browser view or script I would currently expect the same thing: you get tracebacks in the logs, the faulty add-on is not installed, but the site gets created anyway. Do you see different behavior?

Anyway, sounds like you want someone to implement what I proposed here and what Jens basically seconded here.

@jensens
Copy link
Member

jensens commented May 23, 2019

If one has an buggy add-on the admin has to deal with it anyway. It is not Plone's fault. Plone just can fail completely, which is difficult in our case, or - as it is now - it can print big red error messages and lengthy tracebacks.

So, yes we can enhance the code to fail and rollback all. I have no good idea how to achieve this, maybe only by deleting all that was prior created?

But I dont think the current situation is a bug nor a blocker.

If this is that important to you @zopyx please open an new issue as an "enhancement". If you - or another person thinking it is important enough - will work on it it is more than fine. We for sure will merge it, because it is the more elegant solution.

But as said, from my POV this edge case handling of a failing third party addon is not worth spending more time.

@jensens jensens closed this as completed May 23, 2019
@zopyx zopyx reopened this May 23, 2019
@zopyx
Copy link
Member Author

zopyx commented May 23, 2019

The current behavior is broken.

If you are trying to install an add-on then the complete installation of the add-on including all of its dependencies must either work completely or the transaction must be rolled back.

This is no longer the case case here.

My the installation of the policy package with an error failed but it installed its dependencies correctly. This is undesired behavior. This leaves the a Plone installation in an undefined state.
The only possible and valid option is a complete rollback and not a partial commit.

@jensens
Copy link
Member

jensens commented May 23, 2019

Please open a new issue. This is not a blocker. Its a special case with broken third party code. Thanks.

PS.: We had a conscious decision that the current state is good enough.
PPS.: The problem is logged and the administrator gets enough information to solve the issue. S/He has to act manually and delete the unfinished site. No harm done to any existing content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment