Plone 5.1.2 crash after upgrade from 5.1.1

File "/opt/plone/buildout-cache/eggs/", line 13, in from import fix_cataloged_interface_names
File "/opt/plone/buildout-cache/eggs/", line 1, in import alphas
File "/opt/plone/buildout-cache/eggs/", line 14, in from Products.CMFPlone.setuphandlers import addCacheHandlers
File "/opt/plone/buildout-cache/eggs/Products.CMFPlone-", line 10, in from borg.localrole.utils import replace_local_role_manager
File "/opt/plone/buildout-cache/eggs/borg.localrole-3.1.5-py2.7.egg/borg/localrole/", line 3, in from borg.localrole import workspace
File "/opt/plone/buildout-cache/eggs/borg.localrole-3.1.5-py2.7.egg/borg/localrole/", line 14, in from Products.PlonePAS.interfaces.plugins import ILocalRolesPlugin
File "/opt/plone/buildout-cache/eggs/Products.PlonePAS-5.0.15-py2.7.egg/Products/PlonePAS/", line 18, in from import MembershipTool
File "/opt/plone/buildout-cache/eggs/Products.PlonePAS-5.0.15-py2.7.egg/Products/PlonePAS/tools/", line 34, in
from plone.protect.interfaces import IDisableCSRFProtection
File "/opt/plone/buildout-cache/eggs/plone.protect-3.1.3-py2.7.egg/plone/protect/", line 6, in
from plone.protect.utils import protect
File "/opt/plone/buildout-cache/eggs/plone.protect-3.1.3-py2.7.egg/plone/protect/", line 63
exec(_buildFacade(name, spec, callable.doc), facade_globs)
SyntaxError: unqualified exec is not allowed in function 'call' it contains a nested function with free variables

if you are using a Python version < 2.7.9 upgrade to a newer version.
if you can't pin plone.protect to 3.1.2.
Upgrading python is better since a very old python is not very secure anyway.

1 Like


My I know what is the best way to upgrade the python inside plone since it is download and built by the plone installer.

If you have used the 5.1.1 installer it downloads Python 2.7.14, that is new enough.
So it's unlikely the installer has downloaded Python. Check it in the install.log, or you should be able to get it with something like
zinstance/bin/python2.7 -V
if your version is > 2.7.8 that's another problem.

My plone is from an old installer and upgrade till now... I now manual build a Python 2.7.15 and copy them to replace the plone one hope it work without issue.

don't copy a new python in place of the old.
You have to backup your old Plone, build a new installation with new Python and restore there.

you can always use enother Python, you don't have to reinstall Plone for this.
All you need to setup Plone is setuptools in a virtualenv and zc.buildout package installed in it.
So you can create a vritualenv with what ever Python you want.

virtualenv -p /opt/python2.7.14/bin/python . --clear
./bin/pip install zc.buildout

You can also create the virtualenv somewhere else and work with an activated virtualenv if you want:

viritualenv venv
. venv/bin/activate
pip install zc.buildout
buildout bootstrap