[reportlab-users] pyRXP - strange non-deterministic errors on python 2.7 and 64-bit Linux

Roger Whittaker roger at disruptive.org.uk
Wed May 11 15:43:13 EDT 2011


I'm not sure if this is the right place to ask this question, but
I'm hoping it might be - any help gratefully received.

I've been using pyRXP for some years without problems.

I recently reinstalled it
(http://www.reportlab.com/ftp/pyRXP-1.14-daily-unix.tar.gz) on
newly installed 64-bit Linux (openSUSE 11.4 with
gcc-4.5-19.1.x86_64, glibc-2.11.3-12.15.1.x86_64, python 2.7).

I am seeing really strange behaviour (I can't reproduce this on
32-bit Linux with the same package versions).

Here's the XML file:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE newsletter SYSTEM "./newsletter.dtd"[
<!ENTITY jane-sec SYSTEM "./fxml/jane-sec.fxml">
<!ENTITY paul-chairman SYSTEM "./fxml/paul-chairman.fxml">
<!ENTITY contributors SYSTEM "./fxml/contributors.fxml">
<!ENTITY contacts SYSTEM "./fxml/contacts.fxml">
]>
<newsletter>
<document>
<number>Volume 20, Number 1</number>
<date>March 2011</date>
&jane-sec;
&paul-chairman;
&contributors;
&contacts;
</document>
</newsletter>

The files under all fxml exist.

Here's the offending code:

#! /usr/bin/env python
from sys import argv
from pyRXP import Parser
infile = open(argv[1], 'r').read()
p = Parser()
parsed = p.parse(infile)

./preprocess.py 201103.xml
/home/roger/test/moo/201103/fxmlane-sec.fxfxml: No such file or directory
Traceback (most recent call last):
File "./preprocess.py", line 6, in <module>
parsed = p.parse(infile)
pyRXP.error: Error: Couldn't open entity jane-sec, file:///home/roger/test/moo/201103/fxmlane-sec.fxfxml
in unnamed entity at line 12 char 15 of [unknown]
Couldn't open entity jane-sec, file:///home/roger/test/moo/201103/fxmlane-sec.fxfxml
Parse Failed!

Filenames referred to as entities are oddly garbled.

I copy the whole directory somewhere else. A different but similar
error:

./preprocess.py 201103.xml
/home/roger/test/201103/fxml/pauchairmrman.fxml: No such file or directory
Traceback (most recent call last):
File "./preprocess.py", line 6, in <module>
parsed = p.parse(infile)
pyRXP.error: Error: Couldn't open entity paul-chairman, file:///home/roger/test/201103/fxml/pauchairmrman.fxml
in unnamed entity at line 13 char 20 of [unknown]
Couldn't open entity paul-chairman, file:///home/roger/test/201103/fxml/pauchairmrman.fxml
Parse Failed!

There were some warnings during "python setup.py build"

rxp/xmlparser.c: In function ‘init_parser’:
rxp/xmlparser.c:272:5: warning: null argument where non-null required (argument 1)
rxp/xmlparser.c:272:5: warning: null argument where non-null required (argument 1)
rxp/xmlparser.c: In function ‘parse_dtd’:
rxp/xmlparser.c:2702:2: warning: null argument where non-null required (argument 1)
rxp/xmlparser.c:2702:2: warning: null argument where non-null required (argument 1)
rxp/xmlparser.c: In function ‘check_id’:
rxp/xmlparser.c:4810:9: warning: cast from pointer to integer of different size
rxp/xmlparser.c: In function ‘check_attribute_token’:
rxp/xmlparser.c:5443:6: warning: cast to pointer from integer of different size
rxp/xmlparser.c:5453:9: warning: cast from pointer to integer of different size
rxp/xmlparser.c: At top level:
rxp/xmlparser.c:7:13: warning: ‘vcid’ defined but not used




--
========================
Roger Whittaker
roger at disruptive.org.uk
http://disruptive.org.uk
========================


More information about the reportlab-users mailing list