
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? -- My site-packages/lxml directory looks like this: Directory of D:\Python24\Lib\site-packages\lxml 11/19/2005 04:37 PM <DIR> . 11/19/2005 04:37 PM <DIR> .. 11/19/2005 04:30 PM 163,840 etree.pyd 10/25/2003 01:31 PM 888,832 iconv.dll 05/03/2005 08:37 PM 102,400 libexslt.dll 08/06/2005 04:22 PM 898,560 libxml2.dll 05/03/2005 08:37 PM 282,624 libxslt.dll 11/19/2005 04:34 PM <DIR> tests 08/06/2005 04:15 PM 73,728 zlib1.dll 07/07/2005 08:04 AM 5,956 _elementpath.py 11/19/2005 04:34 PM 3,591 _elementpath.pyc 07/07/2005 08:04 AM 21 __init__.py 11/19/2005 04:34 PM 126 __init__.pyc I would suspect a .dll load dependency problem, but PATH and CWD is the same in both cases, so .. stumper. -- Also, and this could be a clueless question, could lxml build off the python libxlm binary package on windows, so that I wouldn't have two copies of libxml2.dll and friends kicking around.. ? I suppose not, since Pyrex would be "upcalling" to the python interface exposed by the libxml python bindings.. I guess libxml directly calls libxml C interface.. ? -- Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com AOL-IM or SKYPE: BKClements