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

StackOverflow https://stackoverflow.com/questions/11825905

  •  24-06-2021
  •  | 
  •  

Domanda

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?!

È stato utile?

Soluzione

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

Altri suggerimenti

In order for the paster localcommand to run, it must be called from the same directory that contains the .egg-info directory (or a child directory inside it). If pasterns unable to find the .egg-info directory, it cannot run a local command. Paster uses the location of the .egg-info directory to locate setup.cfg, which is then used to determine if any local command entry points are available.

Check to see that you have an .egg-info directory generated inside your package, and that you are invoking paster from the same location or a child folder.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top