Create a new Plone addon - mrbob error

Hi them.
I want to start developing of my first test addon. Linux VM, python 2.7, Plone5 is already. I have a problem on the basis of mr.bob. My documentation. Any described ways have leaded to one result.


mrbob --help

do the same answer.

After I came to the conclusion the problem is in pre-installed Python2.7 with unworked mr.bobe and bobtemplates. I do not know how to make a working set.

try adding
to your eggs section in buildout, run buildout and try mr bob again

Readline is a configuration option of the Python build, not of a Plone build.


You need to do this to set up Plone on Windows

The readline module is used by mr.bob and there is a documented problem here: I ran into that myself just now but his patch below worked. Might want to note this for Windows users in the documentation.

    import readline
    readline  # make pyflakes happy, readline makes interactive mode keep history

I ran into two other issues using mr.bob. First, module.__file__ in configurator.resolve_dotted_path raises an AttributeError on the bobtemplates module. This seems to be because there is no in the bobtemplates dir. I actually get this same issue on centos linux, is it possible that others have something more than mr.bob and bobtemplates.plone installed that would resolve this?

I tried adding an to bobtemplates and ran it again but this failed with ConfigurationError: Template directory does not exist: ${path_to_python}\lib\site-packages\bobtemplates\plone_addon Sure enough, the directory should be plone\addon so I think the documentation is incorrect. If I run mr.bob with template bobtemplates:plone\addon it seems to run and I am prompted for some options, but it only creates an empty directory - not particularly useful.

I have never used mr.bob before so this is about as far as I can go. Hopefully this will help someone with knowledge of it identify what might be the issue here, and/or clean up the Plone documentation for it.

If I'm not mistaken, readline is a dependency of Python itself... If you're on Linux, have you tried installing / reinstalling the dev builds..? Use sudo apt-get install python-dev python3-dev or sudo apt-get install --reinstall python-dev python3-dev in case you need to reinstall it.

Certainly strange...

I think there is some confusion because there is a pypi project called (formerly) readline which conflicts with the base python module. On Windows I can actually install pyreadline and this does not require any modification to However, all of the other points still apply after this.

I've been playing around with plonecli as well. In a linux environment, everything works as expected although I noticed two distinct things:

  • The most recent version of plonecli pinned bobtemplates.plone at 3.1.1 instead of the latest 3.3.0. Maybe a problem with that release?
  • The syntax it uses to run mr.bob is different than the documentation page. mrbob bobtemplates.plone:addon -O collective.myaddon instead of mrbob bobtemplates:plone_addon -O collective.myaddon So I think the documentation might be outdated.

On windows I installed pyreadline and am able to proceed through the interactive prompt without error: but the end result is just an empty directory.