
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad Clements wrote:
Hi,
I have lxml 0.8 compiled with the latest windows binaries from
http://xmlsoft.org/sources/win32/
python selftest.py passes, but python test.py fails oddly.
E:\prj\src\lxml-0.8>python test.py Traceback (most recent call last): File "test.py", line 591, in ? exitcode = main(sys.argv) File "test.py", line 554, in main test_cases = get_test_cases(test_files, cfg, tracer=tracer) File "test.py", line 254, in get_test_cases module = import_module(file, cfg, tracer=tracer) File "test.py", line 197, in import_module mod = __import__(modname) File "E:\prj\src\lxml-0.8\src\lxml\tests\test_errors.py", line 9, in ? from lxml import etree ImportError: cannot import name etree
But if I run by hand, it works:
E:\prj\src\lxml-0.8>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from lxml import etree ^Z
Is it possible that test.py is doing something with the pythonpath that might contribute to this oddness?
Is this this 'test.py' from the Zope trunk? I just fixed that recently: - --- Zope/branches/Zope-2_9-branch/test.py 2005-11-14 04:54:58 UTC (rev 40092) +++ Zope/branches/Zope-2_9-branch/test.py 2005-11-14 16:21:24 UTC (rev 40093) @@ -30,7 +30,7 @@ if shome: shome = os.path.abspath(shome) else: - - shome = os.path.join(zhome, 'lib/python') + shome = os.path.join(zhome, 'lib', 'python') elif shome: shome = os.path.abspath(shome) zhome = os.path.dirname(os.path.dirname(shome)) @@ -42,7 +42,7 @@ else: # No zope home, assume that it is the script directory zhome = os.path.abspath(os.path.dirname(sys.argv[0])) - - shome = os.path.join(zhome, 'lib/python') + shome = os.path.join(zhome, 'lib', 'python') sys.path.insert(0, shome) Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDgAaV+gerLs4ltQ4RAsDhAJ4kkqy6977Vca1+84ZtwzTkE4aoDACgyr3o /5plpC5JYLMtJ29MAtaPBtw= =clCl -----END PGP SIGNATURE-----