setting XML_CATALOG_FILES environment variable ignored by lxml 3.4.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Windows 7, 64 bit, using the whl from the "Unofficial Windows Binaries for Python Extension Packages"
Using os.environ[
File "lxml.etree.pyx", line 3310, in lxml.etree.parse (src\lxml\
File "parser.pxi", line 1791, in lxml.etree.
File "parser.pxi", line 1817, in lxml.etree.
File "parser.pxi", line 1721, in lxml.etree.
File "parser.pxi", line 1122, in lxml.etree.
File "parser.pxi", line 580, in lxml.etree.
File "parser.pxi", line 690, in lxml.etree.
File "parser.pxi", line 620, in lxml.etree.
lxml.etree.
The final line of which means that the catalog referenced by the environment variable is not being used.
This is run with the following:
Python : sys.version_
lxml.etree : (3, 4, 4, 0)
libxml used : (2, 9, 2)
libxml compiled : (2, 9, 2)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
* setting the variable is the DOS shell before running the script does not encounter this error.
* running the same script with an earlier version of lxml works as expected:
Python : sys.version_
lxml.etree : (3, 3, 5, 0)
libxml used : (2, 9, 1)
libxml compiled : (2, 9, 1)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
Using "os.environ" to set an environment variable only applies to processes being started as subprocesses later on, not to the current process itself. I therefore cannot imagine that this ever worked. Most likely, there's something else that differs between the two installations on your side.