Zopeskel ImportError: cannot import name BasicNamespace - plone

I have zopeskel 2.21.2 in my virtualenv python and it works fine. Meanwhile, I also have the same version of zopeskel in my Plone buildout (located in ~/.buildout/eggs). However, it does not work. Running zopeskel --list throws the following error:
ImportError: cannot import name BasicNamespace
An advice from this link says to remove the egg. I have removed the egg as well as the cached package in ~/.buildout/cache/dist/ and ran buildout again. However, the problem persists. The funny thing is that the paster script in the same buildout is working.
My zopeskel section in buildout.cfg looks like below:
[zopeskel]
recipe = zc.recipe.egg
eggs =
ZopeSkel
Paste
PasteDeploy
PasteScript
zopeskel.dexterity
${instance:eggs}
Some package versions used in my buildout:
'/home/user/.buildout/eggs/Paste-1.7.5.1-py2.6.egg',
'/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg',
'/home/user/.buildout/eggs/PasteDeploy-1.3.4-py2.6.egg',
'/home/user/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg',
Full traceback:
[user#rizal myplone.site]$ ./bin/zopeskel --list
Traceback (most recent call last):
File "./bin/zopeskel", line 346, in <module>
import zopeskel.zopeskel_script
File "/home/user/.buildout/eggs/ZopeSkel-2.21.2-py2.6.egg/zopeskel/__init__.py", line 2, in <module>
from zopeskel.basic_namespace import BasicNamespace
File "/home/user/.buildout/eggs/ZopeSkel-2.21.2-py2.6.egg/zopeskel/basic_namespace.py", line 2, in <module>
from zopeskel.vars import var, DottedVar, StringVar, BooleanVar, TextVar
File "/home/user/.buildout/eggs/ZopeSkel-2.21.2-py2.6.egg/zopeskel/vars.py", line 2, in <module>
from paste.script.templates import var as base_var
File "/home/user/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/templates.py", line 6, in <module>
import copydir
File "/home/user/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/copydir.py", line 4, in <module>
import pkg_resources
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 2727, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 700, in subscribe
callback(dist)
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 2727, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 2230, in activate
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 1827, in declare_namespace
_handle_ns(packageName, path_item)
File "/home/user/.buildout/eggs/distribute-0.6.24-py2.6.egg/pkg_resources.py", line 1797, in _handle_ns
loader.load_module(packageName); module.__path__ = path
File "/usr/lib/python2.6/pkgutil.py", line 238, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/user/.buildout/eggs/ZopeSkel-2.21.2-py2.6.egg/zopeskel/__init__.py", line 2, in <module>
from zopeskel.basic_namespace import BasicNamespace
ImportError: cannot import name BasicNamespace
What could be wrong?

This usually happens you have ZopeSkel / Paster installed both locally (buildout) and in the global Python installation. Due to failures in Python process of managing site packages you end up with an incompatible combiation.
Solution:
http://docs.plone.org/manage/troubleshooting/exceptions.html#from-zopeskel-basic-namespace-import-basicnamespace

Related

Jupyter notebook cannot connect to the kernel

Jupyter notebook cannot connect to the kernel. I tried all the methods. I also reinstalled the computer system, reset the c drive, reinstalled anaconda, etc., but the same error was reported. I also changed the file path to Chinese, but Still fails, why? How to deal with it? The error is as follows: (the front part is the startup part, you can start to see it from the end, and the startup fails at the end)
[W 2022-12-11 19:23:10.102 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-12-11 19:23:10.102 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2022-12-11 19:23:10.111 LabApp] JupyterLab extension loaded from C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab
[I 2022-12-11 19:23:10.111 LabApp] JupyterLab application directory is C:\ProgramData\Anaconda3\share\jupyter\lab
[I 19:23:10.117 NotebookApp] Serving notebooks from local directory: C:\Users\dilim
[I 19:23:10.117 NotebookApp] Jupyter Notebook 6.4.12 is running at:
[I 19:23:10.117 NotebookApp] http://localhost:8888/?token=a2380da4760b3519ffd6c9e8bc15220404126807c6c4f538
[I 19:23:10.117 NotebookApp] or http://127.0.0.1:8888/?token=a2380da4760b3519ffd6c9e8bc15220404126807c6c4f538
[I 19:23:10.117 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 19:23:10.149 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/Users/dilim/AppData/Roaming/jupyter/runtime/nbserver-7544-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=a2380da4760b3519ffd6c9e8bc15220404126807c6c4f538
or http://127.0.0.1:8888/?token=a2380da4760b3519ffd6c9e8bc15220404126807c6c4f538
[I 19:23:17.357 NotebookApp] Kernel started: 1474a909-0184-4cc9-995e-713135cea29f, name: python3
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 5, in <module>
from .connect import * # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\connect.py", line 11, in <module>
import jupyter_client
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 8, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\channels.py", line 4, in <module>
import asyncio
File "C:\ProgramData\Anaconda3\lib\asyncio\__init__.py", line 8, in <module>
from .base_events import *
File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 23, in <module>
import socket
File "C:\ProgramData\Anaconda3\lib\socket.py", line 54, in <module>
import os, sys, io, selectors
File "C:\ProgramData\Anaconda3\lib\selectors.py", line 12, in <module>
import select
File "C:\Users\dilim\Desktop\chooseexce\select.py", line 3, in <module>
X = data=np.loadtxt("1.xlsx",delimiter=',',unpack=False)
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 1338, in loadtxt
arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 999, in _read
arr = _load_from_filelike(
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 50: illegal multibyte sequence
[I 19:23:20.341 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\__init__.py", line 5, in <module>
from .connect import * # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\connect.py", line 11, in <module>
import jupyter_client
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 8, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\channels.py", line 4, in <module>
import asyncio
File "C:\ProgramData\Anaconda3\lib\asyncio\__init__.py", line 8, in <module>
from .base_events import *
File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 23, in <module>
import socket
File "C:\ProgramData\Anaconda3\lib\socket.py", line 54, in <module>
import os, sys, io, selectors
File "C:\ProgramData\Anaconda3\lib\selectors.py", line 12, in <module>
import select
File "C:\Users\dilim\Desktop\chooseexce\select.py", line 3, in <module>
X = data=np.loadtxt("1.xlsx",delimiter=',',unpack=False)
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 1338, in loadtxt
arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 999, in _read
arr = _load_from_filelike(
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 50: illegal multibyte sequence

import paramiko throws '_sodium' has no function error

Importing paramiko throws following exception on Python3.
Traceback (most recent call last):
File "requirements_check.py", line 117, in <module>
import paramiko
File "/usr/local/lib/python3.5/dist-packages/paramiko/__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/usr/local/lib/python3.5/dist-packages/paramiko/transport.py", line 90, in <module>
from paramiko.ed25519key import Ed25519Key
File "/usr/local/lib/python3.5/dist-packages/paramiko/ed25519key.py", line 22, in <module>
import nacl.signing
File "/usr/local/lib/python3.5/dist-packages/nacl/signing.py", line 17, in <module>
import nacl.bindings
File "/usr/local/lib/python3.5/dist-packages/nacl/bindings/__init__.py", line 17, in <module>
from nacl.bindings.crypto_aead import (
File "/usr/local/lib/python3.5/dist-packages/nacl/bindings/crypto_aead.py", line 28, in <module>
lib.crypto_aead_chacha20poly1305_ietf_keybytes()
AttributeError: cffi library '_sodium' has no function, constant or global variable named 'crypto_aead_chacha20poly1305_ietf_keybytes'
Does anyone know why?
Try uninstalling & reinstalling PyNaCl:
pip uninstall PyNaCl
pip install PyNaCl

QT conflict between Anaconda and MacPort

I'm on OS X 10.10.4 with Macports and Anaconda (condo 3.15.1).
During the process of building the robotic simulator ARGoS,
https://github.com/ilpincy/argos3
we ran into runtime 'qt' issues running the ARGoS examples.
[FATAL] Can't load library "/usr/local/lib/argos3/libargos3plugin_simulator_epuck.dylib" even after trying to add extensions for shared library (dylib) and module library (so):
/usr/local/lib/argos3/libargos3plugin_simulator_epuck.dylib: dlopen(/usr/local/lib/argos3/libargos3plugin_simulator_epuck.dylib, 1): Library not loaded: #rpath/./libQtOpenGL.4.dylib
I learned that cmake found 'qt' within Anaconda which had runtime problems.
-- Found Qt4: /Users/davidlaxer/anaconda/bin/qmake (found version "4.8.6")
Next, I installed qt4-mac:
sudo port install qt4-mac
---> Computing dependencies for qt4-mac
---> Fetching archive for qt4-mac
---> Attempting to fetch qt4-mac-4.8.7_0.darwin_14.x86_64.tbz2 from http://packages.macports.org/qt4-mac
---> Attempting to fetch qt4-mac-4.8.7_0.darwin_14.x86_64.tbz2.rmd160 from http://packages.macports.org/qt4-mac
---> Installing qt4-mac #4.8.7_0
---> Activating qt4-mac #4.8.7_0
NOTE: Qt database plugins for mysql55, postgresql91, and sqlite2 are NOT installed by this port; they are installed by qt4-mac-*-plugin instead.
---> Cleaning qt4-mac
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
When I installed 'qt' with Macports, ipython qtconsole broke.
David-Laxers-MacBook-Pro:build_simulator davidlaxer$ ipython qtconsole
Traceback (most recent call last):
File "/Users/davidlaxer/anaconda/bin/ipython", line 6, in <module>
sys.exit(start_ipython())
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 573, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/core/application.py", line 369, in initialize
self.parse_command_line(argv)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 471, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 402, in initialize_subcommand
subapp = import_item(subapp)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/qt/console/qtconsoleapp.py", line 50, in <module>
from IPython.external.qt import QtCore, QtGui
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/external/qt.py", line 23, in <module>
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/external/qt_loaders.py", line 277, in load_qt
result = loaders[api]()
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/IPython/external/qt_loaders.py", line 184, in import_pyqt4
from PyQt4 import QtGui, QtCore, QtSvg
ImportError: dlopen(/Users/davidlaxer/anaconda/lib/python2.7/site-packages/PyQt4/QtGui.so, 2): Symbol not found: _iconv
Referenced from: /Users/davidlaxer/anaconda/lib//libxml2.2.dylib
Expected in: /opt/local/lib//libiconv.2.dylib
How is this supposed to work?

AttributeError: 'module' object has no attribute 'NoDefault'

Running paster on Plone UnifiedInstaller 4.2.5 I get the following errors. Any idea on the problem?
Traceback (most recent call last):
File "../bin/paster", line 382, in <module>
import paste.script.command
File "/var/plone/my.app/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 3, in <module>
import pkg_resources
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 704, in subscribe
callback(dist)
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2262, in activate
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1847, in declare_namespace
_handle_ns(packageName, path_item)
File "/var/plone/my.app/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1817, in _handle_ns
loader.load_module(packageName); module.__path__ = path
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/var/plone/my.app/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/__init__.py", line 2, in <module>
from zopeskel.basic_namespace import BasicNamespace
File "/var/plone/my.app/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/basic_namespace.py", line 2, in <module>
from zopeskel.vars import var, DottedVar, StringVar, BooleanVar, TextVar
File "/var/plone/my.app/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/vars.py", line 2, in <module>
from paste.script.templates import var as base_var
File "/var/plone/my.app/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/templates.py", line 145, in <module>
NoDefault = command.NoDefault
AttributeError: 'module' object has no attribute 'NoDefault'
My zopeskel section of base.cfg has the following entries
[zopeskel]
recipe = zc.recipe.egg
eggs =
ZopeSkel <= 2.99
zopeskel.dexterity == 1.4.1
zopeskel.diazotheme
Paste
PasteDeploy
PasteScript
${buildout:eggs}
I can run zopeskel and create a dexterity package but I can not add custom content types because of this paster issue. My dexterity package is already installed in buildout.cfg

Error after adding plone.app.dexterity to Plone 4.3 buildout

I've used https://github.com/plone/plonedev.vagrant to set up a Plone 4.3 development environment on Windows. I've been trying to add Dexterity support to my installation, but have run into problems.
The steps I have taken are as follows:
Added zopeskel.dexterity and plone.app.dexterity [relations, grok] to the [eggs] section of my buildout.cfg
Added ZopeSkel <= 2.99 to the [versions] section of buildout.cfg
I re-run buildout and try to start the server in foreground mode, but get this traceback:
vagrant#precise32:~$ ./runbin.sh plonectl fg
instance: Traceback (most recent call last):
File "/home/vagrant/Plone/zinstance/bin/instance", line 290, in <module>
import plone.recipe.zope2instance.ctl
File "/home/vagrant/Plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.9-py2.7.egg/plone/recipe/__init__.py", line 1, in <module>
__import__('pkg_resources').declare_namespace(__name__)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 704, in subscribe
callback(dist)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2262, in activate
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1847, in declare_namespace
_handle_ns(packageName, path_item)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1817, in _handle_ns
loader.load_module(packageName); module.__path__ = path
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/__init__.py", line 2, in <module>
from zopeskel.basic_namespace import BasicNamespace
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/basic_namespace.py", line 2, in <module>
from zopeskel.vars import var, DottedVar, StringVar, BooleanVar, TextVar
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/vars.py", line 2, in <module>
from paste.script.templates import var as base_var
ImportError: No module named script.templates
EDIT: I forgot to mention that buildout.cfg extends base.cfg, which contains the following:
[zopeskel]
# installs paster and Zopeskel
recipe = zc.recipe.egg
eggs =
ZopeSkel
Paste
PasteDeploy
PasteScript
${buildout:eggs}
I just tried explicitly adding PasteScript to the [eggs] section in buildout.cfg. After running buildout and attempting to start the server, I get a different traceback:
vagrant#precise32:~$ ./runbin.sh plonectl fg
instance: Traceback (most recent call last):
File "/home/vagrant/Plone/zinstance/bin/instance", line 291, in <module>
import plone.recipe.zope2instance.ctl
File "/home/vagrant/Plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.9-py2.7.egg/plone/recipe/__init__.py", line 1, in <module>
__import__('pkg_resources').declare_namespace(__name__)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 704, in subscribe
callback(dist)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2835, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2262, in activate
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1847, in declare_namespace
_handle_ns(packageName, path_item)
File "/home/vagrant/Plone/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1817, in _handle_ns
loader.load_module(packageName); module.__path__ = path
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/__init__.py", line 2, in <module>
from zopeskel.basic_namespace import BasicNamespace
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/basic_namespace.py", line 2, in <module>
from zopeskel.vars import var, DottedVar, StringVar, BooleanVar, TextVar
File "/home/vagrant/Plone/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/vars.py", line 2, in <module>
from paste.script.templates import var as base_var
File "/vagrant/plone/src/hello.world/PasteScript-1.7.5-py2.7.egg/paste/script/templates.py", line 9, in <module>
from paste.util.template import paste_script_template_renderer
ImportError: No module named util.template
Is this an issue with my Python path? I ran bin/zopepy then did import paste;print paste.__file__ and the output is:
/vagrant/plone/src/hello.world/PasteScript-1.7.5-py2.7.egg/paste/__init__.pyc
The Paste-1.7.5.1 egg directory does contain a paste/util/template.py file, but it looks like the interpreter can't find it.
You don't need to add Dexterity to Plone 4.3, it's already included:
http://plone.org/products/plone/releases/4.3
As documented on the zopeskel.dexterity PyPI page you need to include the PasteScript egg too; the traceback shows you it is missing:
[zopeskel]
recipe = zc.recipe.egg
eggs =
ZopeSkel < 3.0dev
Paste
PasteDeploy
PasteScript
zopeskel.dexterity
${buildout:eggs}
You may be doing a lot more work than you need to do. The plonedev.vagrant kit comes with zopeskel and zopeskel.dexterity preinstalled. Take a look at this transcript:
steve#lumpy:~/plonedev_vagrant$ vagrant up
[default] Importing base box 'precise32'...
...
steve#lumpy:~/plonedev_vagrant$ vagrant ssh
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-48-generic i686)
...
vagrant#vagrant-ubuntu-precise-32:~/Plone/zinstance$ ll bin
...
-rwxr-xr-x 1 vagrant vagrant 20023 Jul 16 01:41 zopeskel*
...
vagrant#vagrant-ubuntu-precise-32:~/Plone/zinstance$ cd src
...
vagrant#vagrant-ubuntu-precise-32:~/Plone/zinstance/src$ ~/Plone/zinstance/bin/zopeskel dexterity
dexterity: A Dexterity-based product
...
There's one bit of magic in this: due to the way the plonedev.vagrant kit symbolically links the src directory, you can't cd to it and use "../bin/zopeskel". That's why the "~/Plone/zinstance/bin/zopeskel dexterity" command is used.
We should either document that oddity or find a way to avoid it.

Resources