[wingide-users] import error ("no module named <bla>"), with Plone 2.1.1 on Mac OS X

T. Kim Nguyen nguyen+wingide-users at uwosh.edu
Thu Feb 8 09:23:40 MST 2007


Hi - I've been wrestling with the project properties to try to stop  
getting import errors when I debug Plone 2.1.1 on Mac OS X.

When I checked the box in Project Properties to add Zope/Plone  
support, I tried setting the Zope2 instance home to the ZOPE_HOME  
value given in my Zope control panel:

> Zope Version
> (Zope 2.7.8-final, python 2.3.5, darwin)
> Python Version
> 2.3.5 (#1, Oct 13 2005, 12:02:13) [GCC 3.3 20030304 (Apple  
> Computer, Inc. build 1666)]
> System Platform
> darwin
> SOFTWARE_HOME
> /Applications/Plone2/Library/Software/Zope278/Zope/lib/python
> ZOPE_HOME
> /Applications/Plone2/Library/Software/Zope278/Zope
> INSTANCE_HOME
> /Applications/Plone2/Sites/Default
> CLIENT_HOME
> /Applications/Plone2/Sites/Default/var

When I click on Apply, WingIDE gives me this error dialog box:

> Some property warnings were encountered:
>
> - Zope2 installation directory could not be read from ZOPEINST/etc/ 
> zope.conf-- using '/Applications/Plone2/Library/Software/Zope278/Zope'
> - Zope2 instance directory '/Applications/Plone2/Library/Software/ 
> Zope278/Zope' missing expected 'Products' subdirectory
> - Zope2 home directory '/Applications/Plone2/Library/Software/ 
> Zope278/Zope' (obtained from etc/zope.conf in the Zope Instance)  
> appears invalid -- missing expected directories and files

I tried a few other values for Zope2 instance home.  The only one  
that did not result in this error dialog box is "/Applications/Plone2/ 
Sites/Default" (ie. the parent of my Plone "Products" directory)

However, once I start debugging, I get these import errors everywhere:

> ImportError: No module named CMFCore.utils

the offending lines being at the top of files that run fine within  
Zope/Plone as long as I'm not trying to use WingIDE debugging:

> from Products.CMFCore.utils import getToolByName

In the Project Properties, I had tried to leave the Python Path to  
"use default", but then have since tried this custom value

> /Applications/Plone2/Library/Software/Zope278/Zope/lib/python:/ 
> Applications/Plone2/Sites/Default:/Applications/Plone2/Sites/ 
> Default/Products

and several other variations of the same, but continue to get the  
import errors.

Help!  Any suggestions on what to set in the Project Properties would  
be greatly appreciated.

	Kim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20070208/9b48b474/attachment.html


More information about the wingide-users mailing list