-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named xxx #13
Comments
Hi, what is def_heat_plugin? is it a resource under /usr/lib/heat/ ? |
Hi Praneet. def_heat_plugin is a heat resource type plugin. Yes, I copied the package to /usr/lib/heat/. It works if I put the plugin under /usr/lib/python2.6/site-packages/. But it's not way I'd like it to work. According to the directions of Openstack Official Heat/Plugins wiki https://wiki.openstack.org/wiki/Heat/Plugins, we only need "To install a plugin, copy the Python modules to one of the configured plugin directories. Note that heat-engine must be restarted after this in order to load the new plugins." But I hit the issue if I don't copy the plugin to site-packages. Here is the directory tree of my plugin. Only modules in resource/cms/ are subclass of Resources. ---def_heat_plugin |
Hi Zheng, Try something this ... import sys sys.path.append( ) import Bar On Tue, May 12, 2015 at 3:12 AM, Zheng Xi Zhou [email protected]
|
I've tried what you suggested, it worked! Thanks a lot:) |
Hi Praneet. In you file https://github.com/Juniper/contrail-heat/blob/master/contrail_heat/resources/vn_subnet.py, there is a line "from contrail_heat.resources import contrail". What I did is the same as you for the heat resource plugin, but I hit "ImportError: No module named def_heat_plugin.client" when I wrote "from def_heat_plugin.client import constants as const". Any suggestions? Thanks.
The text was updated successfully, but these errors were encountered: