Search code examples
plonepasterzopeskel

What makes "paster addcontent" fail for a package created with Zopeskel template "archetype"?


Here is the situation:

  • fresh Plone 4.2 buildout
  • a fresh package created using Zopeskel 2.21.1 with template 'archetype' and configured in my buildout using mr.developer

Trying to add some content types inside my package fails with:

[ajung@dev1 nva.aktionsmittel]$ bin/paster addcontent
Command 'addcontent' not known (you may need to run setup.py egg_info)

Running setup.py egg_info did not help.

setup.py contains:

setup.py:      paster_plugins=["ZopeSkel"]

setup.cfg contains:

[zopeskel]
template = archetype

What is the magic behind the local commands in order to make "paster addcontent" working? It worked in other contexts as it should?!


Solution

  • ZopeSkel 2 issues

    You are following a bad tutorial. Please make sure that

    This is the way to make paster aware of your egg and its dependencies correctly and thus local commands can work.

    ZopeSkel 3 issue (seemingly unrelated)

    There was a recent change in ZopeSkel, meaning that you if you use ZopeSkel 3+ you need to be in srcfolder when running the command.

    See note here:

    https://github.com/collective/templer.plone.localcommands/#executing-local-commands