[wingide-users] import error ("no module named <bla>"),
with Plone 2.1.1 on Mac OS X
mj at zopatista.com
Fri Feb 9 00:34:15 MST 2007
On 8. feb. 2007, at 17.23, T. Kim Nguyen wrote:
> 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:
> When I click on Apply, WingIDE gives me this error dialog box:
> 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"
That's correct, that's the instance home. It's also the directory
with the 'etc' sub directory with the zope.conf file Wing needs to
determine all the paths.
> 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
> and several other variations of the same, but continue to get the
> import errors.
Wing's Zope support is needed to support the source analyzer; it does
not alter the python path for you when debugging however. Zope 2
hacks around with paths to support multiple Products directories, and
Wing's analyzer needs to take that into account.
To run Zope/Plone tests, use the zope test runner, as described in an
earlier email to this list:
(note that it forgets to mention that you'll need to add test.py (in
Zope278/Zope/bin) to your project first).
More information about the wingide-users