0

i'm trying to include plone.app.debugtoolbar into my plone4.2 buildout, but running into the same "ImportError: No module named paste.evalexception" described near the end of Martin's announcement: http://plone.293351.n2.nabble.com/ANN-plone-app-debugtoolbar-td6988915.html. this made me think the dependency had been fixed but i'm still getting it?

  File "/home/rik/Plone/buildout-cache/eggs/plone.app.debugtoolbar-1.0a2-py2.7.egg/plone/app/debugtoolbar/browser/interactive.py", line 10, in <module>
    from paste.evalexception import evalcontext
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/rik/Plone/zeocluster/parts/client1/etc/site.zcml", line 16.2-16.23
    ZopeXMLConfigurationError: File "/home/rik/Plone/buildout-cache/eggs/Products.CMFPlone-4.2.0.1-py2.7.egg/Products/CMFPlone/configure.zcml", line 102.4-106.10
    ZopeXMLConfigurationError: File "/home/rik/Plone/buildout-cache/eggs/plone.app.debugtoolbar-1.0a2-py2.7.egg/plone/app/debugtoolbar/configure.zcml", line 10.2-10.32
    ZopeXMLConfigurationError: File "/home/rik/Plone/buildout-cache/eggs/plone.app.debugtoolbar-1.0a2-py2.7.egg/plone/app/debugtoolbar/browser/configure.zcml", line 113.4-120.10
    ImportError: No module named paste.evalexception

does this require some patch, pinning of paster...?

rikb
  • 630
  • 5
  • 18

2 Answers2

1

Simply adding an explicit dependency on Paste to my buildout:

devtools = 
    ...
    Paste
    plone.app.debugtoolbar

did the trick! i'm still not sure why this dependency isn't/can't be part of plone.app.debugtoolbar, but it does seem to be a totally intra-buildout issue and unrelated to the 'external' shell's python, as @Martijn and i pursued above.

rikb
  • 630
  • 5
  • 18
0

You are missing the Paste egg; in some cases, this egg is nested inside a development egg within your buildout which confuses buildout and it won't install it.

The work-around is to install it manually:

python -m easy_install Paste
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • thanks for your quick reply! but i thought one of the goals of the buildout procedure was to 'insulate' the system and the python it uses from the one i happen to be using in the shell with easy_install ? – rikb Sep 06 '12 at 20:50
  • @rikb: it is, but due to the way ZopeSkel and Paster (ab)use certain setup.py features Paster eggs get installed in unexpected places (unexpected to buildout). Paster is one of the few tools that (like virtualenv and easy_install or pip) have a use as a global install, and that's the 'easy' workaround for this particular problem. – Martijn Pieters Sep 06 '12 at 20:54
  • hmm that didn't do it: easy_install did get paster and stuck it in `/usr/local/lib/python2.7/dist-packages/Paste-1.7.5.1-py2.7.egg`. but buildout doesn't seem to find it there? – rikb Sep 06 '12 at 21:14
  • @rikb: Is that the same python that you run buildout with? check `head bin/buildout`. – Martijn Pieters Sep 06 '12 at 21:15
  • no! but when i use the `../Python-2.7/bin/python` used by buildout, #1 the best match is `paster 0.7`, vs. the `Paste 1.7.5.1` retrieved by my `/usr/bin/python`; and #2 i can't even install this: `error: Setup script exited with error: SandboxViolation: open('/home/rik/paster.cfg', 'wb') {}` ?! – rikb Sep 06 '12 at 21:23
  • @rikb: Sorry, without some deep-diving debugging I don't know what could be your problem there. – Martijn Pieters Sep 07 '12 at 10:27