Plone 4.3.4 - ImportError: No module named dexterity.localcommands.dexterity

旧巷老猫 提交于 2019-12-23 15:05:15

问题


On a vanilla Plone 4.3.4 site (Unified Installer on Ubuntu 14.04.1LTS), and after updating buildout.cfg with the zopeskel and paster boiler plate stuff and running buildout, I successfully created a dexterity package in my src folder:

$ cd src  
$ ../bin/zopeskel dexterity my.package

After updating buildout.cfg (adding my.package to the eggs section and src/my.package to the develop section) and running buildout, I tried to add content to my new package, like I have done so many times in Plone 4.3.3 and earlier versions:

$ cd my.package  
$ ../../bin/paster addcontent dexterity_content

This results in the following error message:

Traceback (most recent call last):  

 File "../../bin/paster", line 260, in <module>
   sys.exit(paste.script.command.run())  
 File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
   invoke(command, command_name, options, args[1:])
 File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke exit_code = runner.run(args)
 File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
   result = self.command()
 File "/home/Plone434_site/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/localcommands/__init__.py", line 70, in command
   self._extend_templates(templates, args[0])
 File "/home/Plone434_site/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/localcommands/__init__.py", line 204, in _extend_templates tmpl = entry.load()(entry.name)
 File "/home/Plone434_site/buildout-cache/eggs/setuptools-7.0-py2.7.egg/pkg_resources.py", line 2184, in load ['__name__'])

ImportError: No module named dexterity.localcommands.dexterity  

Doing exactly the same on a Plone 4.3.3 site works just fine.

When I run the following:

$ ../../bin/paster addcontent -l

I get the following warning messages:

Warning: could not load entry point dexterity_behavior (ImportError: No module named dexterity.localcommands.dexterity)  
Warning: could not load entry point dexterity_content (ImportError: No module named dexterity.localcommands.dexterity)
Available templates:
  No template

I am wondering if this is somehow related to Plone 4.3.4 using setuptools 7.0, while previous versions used 0.7.2

Any advice to resolve this issue would be much appreciated.

来源:https://stackoverflow.com/questions/28305951/plone-4-3-4-importerror-no-module-named-dexterity-localcommands-dexterity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!