[TransWarp] Re: Problem with TW
Phillip J. Eby
pje at telecommunity.com
Wed Oct 24 13:34:10 EDT 2001
I would recommend you add your Zope's lib/python directory to your Python
path; It sounds as though the version of the Interface package you're using
isn't up-to-date enough. Also, although the TW core will work without
ExtensionClasses, the test suite currently *does* require
ExtensionClasses. You also need to be using a Zope 2.4.x release, for
compatibility with Python 2.1.
At 10:09 AM 10/24/01 -0600, Tim Stewart wrote:
>Environment:
> Python 2.1
> Windows 2000
>
>I installed Interface-0.4.0 (and renamed the directory to Interface) to my
>C:\Python21 dir.
>
>I installed kjbuckets0.py and renamed it to kjbuckets.py (in my
>C:\Python21 dir)
>
>I installed the TW package in my C:\Python21 dir
>
>I then ran python unittest.py TW.tests.suite and got the following:
>
>Microsoft Windows 2000 [Version 5.00.2195]
>(C) Copyright 1985-2000 Microsoft Corp.
>
>c:\>cd python21
>
>C:\Python21>cd lib
>
>C:\Python21\Lib>python unittest.py TW.tests.suite
>Traceback (most recent call last):
> File "unittest.py", line 711, in ?
> main(module=None)
> File "unittest.py", line 662, in __init__
> self.parseArgs(argv)
> File "unittest.py", line 689, in parseArgs
> self.createTests()
> File "unittest.py", line 695, in createTests
> self.module)
> File "unittest.py", line 457, in loadTestsFromNames
> suites.append(self.loadTestsFromName(name, module))
> File "unittest.py", line 442, in loadTestsFromName
> test = obj()
> File "c:\Python21\TW\tests\__init__.py", line 12, in suite
> import Aspects, SOX, StructuralModel
> File "c:\Python21\TW\tests\Aspects.py", line 3, in ?
> from TW.Aspects import *
> File "c:\Python21\TW\Aspects.py", line 12, in ?
> from TW.Features import _DefaultFeatureMap, ClassFeature
> File "c:\Python21\TW\Features.py", line 124, in ?
> isFeatureDef = FeatureWeaving.isImplementedBy
>AttributeError: Interface instance has no attribute 'isImplementedBy'
>
>C:\Python21\Lib>
>
>
>
>In Features.py, I changed:
>
>isFeatureDef = FeatureWeaving.isImplementedBy
>
>to:
>
>isFeatureDef = FeatureWeaving.implementedBy
>
>Assuming that was a "fix", I ran the unit test again and got:
>
>
>C:\Python21\Lib>python unittest.py TW.tests.suite
>Traceback (most recent call last):
> File "unittest.py", line 711, in ?
> main(module=None)
> File "unittest.py", line 662, in __init__
> self.parseArgs(argv)
> File "unittest.py", line 689, in parseArgs
> self.createTests()
> File "unittest.py", line 695, in createTests
> self.module)
> File "unittest.py", line 457, in loadTestsFromNames
> suites.append(self.loadTestsFromName(name, module))
> File "unittest.py", line 442, in loadTestsFromName
> test = obj()
> File "c:\Python21\TW\tests\__init__.py", line 12, in suite
> import Aspects, SOX, StructuralModel
> File "c:\Python21\TW\tests\Aspects.py", line 5, in ?
> from Acquisition import Implicit
>ImportError: No module named Acquisition
>
>C:\Python21\Lib>
>
>It looks like TW only runs with Zope installed or inside of Zope. I have
>it installed but it's not hooked into the Python path.
More information about the PEAK
mailing list