Run make build-backend error: Error: 'zcml' dict setting is removed in 2.0

I want to add a plone add-on, but run make build-backend got errors:

+ dirname /home/plone/portal/Makefile
+ make -C ./backend/ build-dev
make[1]: Entering directory '/home/plone/portal/backend'
+ which python3
+ python3 -c 'import sys; print((int(sys.version_info[0]), int(sys.version_info[1])) >= tuple(map(int, '\''3.8'\''.split('\''.'\''))))'
++ tput setaf 2
++ tput sgr0
+ echo '==> Create instance configuration'
==> Create instance configuration
+ bin/cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance
Warning: initial user's password is insecure, it should be at least 10 characters long!

Error: 'zcml' dict setting is removed in 2.0, use 'zcml_' prefix variables instead!

ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
make[1]: *** [Makefile:94: config] Error 1
make[1]: Leaving directory '/home/plone/portal/backend'
make: *** [Makefile:51: build-backend] Error 2

Ubuntu 22.04,Plone 6.0.9 works ok.

Thank you, it's work now.

1 Like

The proper fix is updating your instance.yaml file.

    initial_user_name: 'admin'
    initial_user_password: 'admin'
    zcml_package_includes: <your project name written in load profiles>

    db_storage: direct

Find the cookiecutter call in the Makefile and pin the version of cookiecutter-zope-instance to 1.0.1.

cookiecutter --checkout 1.0.1 [... other options here ...] cookiecutter-zope-instance

Or update the instance.yaml as mentioned above. Anyway, I recommend pinning versions and not depend on the main branch of any project.

yes, you're right. Thanks!

Thank you! make build-backend work now.

I'm also installed plone6.0.10.1 successful, because cookiecutter gh:collective/cookiecutter-plone-starter can create right instance.yaml now.

1 Like