[4suite] Re: [XML-SIG] problem whith the error " ImportError: cannot import name boolean"

Mike Olson Mike.Olson@fourthought.com
26 Jul 2002 11:42:54 -0600


On Fri, 2002-07-26 at 11:47, Uche Ogbuji wrote:
> 
> > Unfortunatly, the code I've added could
> > cause use problems down the line unless we encourage people to do a
> > fresh install as opposed to upgrading 4Suite.
> 
> Could you clarify this last sentence a bit?

Before my change there was Ft/Lib/boolean.so

After my change:
Ft/Lib/boolean.py
Ft/Lib/booleanc.so

boolean.py basically does from booleanc import * inside a try and
except.

The problem is that is you upgrade, then there will be two files called
boolean in that directory.  boolean.py and boolean.so

boolean.so will never get reinstalled, but it could get imported first.

this is not really a problem until we change boolean.c (fix a bug, add a
feature, etc).  Inwhich case, if the old boolean.so gets imported before
boolean.py, then the new functionality will not be available.

Also note, we cannot really get around this.  If we do anything in
Ft/Lib/__init__.py then we hav installation issues as setup.py imports
from Ft/Lib/DistExt in the installation directory.  At install time,
boolean.* does not exist yet and we would get exceptions.

Is that clear? :)

Mike

> 
> 
> > [molson@penny 4Suite]$ python -c"from Ft.Lib import boolean"
> > There is a problem importing the compiled boolean module.
> > This can mean that there were errors with ths installation of
> > 4Suite.  Inwhich case you should contact 4Suite@lists.fourthought.com
> > with the
> > error messages generated during installation.
> > 
> > This can also mean that you are attempting to execute code from the
> > installation
> > directory.  If your current working directory contains the setup.py file
> > for
> > 4Suite installation then you are in the installation directory for
> > 4Suite.  You
> > must change directories before you can use the Ft module.
> 
> Could you reverse the order of this message?  I think it should first of
> all make them check that they're not running from the build dir, and
> *then* say if they have a remaining problem they should report to the
> list.  I just worry that people won't read through the whole message.
> 
> I can do this, if you like.
> 
> 
> -- 
> Uche Ogbuji                                    Fourthought, Inc.
> http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
> Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
> Basic XML and RDF techniques for knowledge management, Part 7 -
> http://www-106.ibm.com/developerworks/xml/library/x-think12.html
> Keeping pace with James Clark -
> http://www-106.ibm.com/developerworks/xml/library/x-jclark.html
> Python and XML development using 4Suite, Part 3: 4RDF -
> http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A1EA5A2CF4621C386256BBB006F4CEC
-- 
Mike Olson                                Principal Consultant
mike.olson@fourthought.com                +1 303 583 9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St,                      http://4Suite.org
Boulder, CO 80301-2537, USA
XML strategy, XML tools, knowledge management