[XML-SIG] [ pyxml-Bugs-567411 ] Can't find system entity (Win32 only)

noreply@sourceforge.net noreply@sourceforge.net
Tue, 11 Jun 2002 07:21:56 -0700

Bugs item #567411, was opened at 2002-06-11 07:21
You can respond by visiting: 

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't find system entity (Win32 only)

Initial Comment:

When parsing (SAX) an XML file that calls a system 
entity with the following code, it works perfectly in a 
Linux box, but it raises an IOError in urllib in a Windows 

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE profil SYSTEM "mydoctype.dtd" [
<!ENTITY list_usage.xml SYSTEM "list_usage.xml">

<?xml version="1.0" encoding="ISO-8859-1"?>

from xml.sax import make_parser
from xml.sax.handler import feature_external_ges
p = make_parser(["xml.sax.drivers2.drv_xmlproc_val"])
dh = MyHandler()
# Crash hereafter

  File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 
109, in parse
  File C:\PYTHON21\_xmlplus\sax\xmlreader.py, line 
123, in parse
  File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 
203, in feed
  File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 
337, in external_entity_ref
  File C:\PYTHON21\_xmlplus\sax\saxutils.py, line 460, 
in prepare_input_source
  File C:\PYTHON21\lib\urllib.py, line 71, in urlopen
  File C:\PYTHON21\lib\urllib.py, line 176, in open
  File C:\PYTHON21\lib\urllib.py, line 400, in open_file
  File C:\PYTHON21\lib\urllib.py, line 413, in 
IOError: (see above)

My Windows configuration :
Win98 2e + Python 2.1.3 + pyXML 0.7.1 (binary)

My Linux configuration :
Debian 2.2 + Python 2.1.3 (source distro) + pyXML 
0.7.1 (source distro)

In both cases, the xml file is parsed from the local file 

another "strange" thing : the parser finds the DTD but 
not the system entities (all in the same directory).

Linux : /home/glt/xresources/main.xml
Windows : C:\Mes Documents\xresources\main.xml

Don't hesitate to contact me if you need more 




You can respond by visiting: