pombreda / xhtml2pdf

Automatically exported from code.google.com/p/xhtml2pdf
GNU General Public License v2.0
0 stars 0 forks source link

Tag handling error #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In the console, type the following:

xhtml2pdf
http://www.walrusmagazine.com/print/2009.01-agriculture-tobacco-ginseng-robert-h
ough/
test.pdf

What is the expected output? What do you see instead?
The expected result is a properly-rendered PDF file. Instead, there are
rendering errors.

What version of the product are you using? On what operating system?
pisa-3.0.29-py2.5.egg on Ubuntu 8.10

The following error message is produced:
ERROR [ho.pisa] Tag handling
u'<br/>'
Traceback (most recent call last):
  File
"/usr/lib/python2.5/site-packages/pisa-3.0.29-py2.5.egg/sx/pisa3/pisa_parser.py"
,
line 109, in pisaGetAttributes
    nv = c.getFile(nv)
  File
"/usr/lib/python2.5/site-packages/pisa-3.0.29-py2.5.egg/sx/pisa3/pisa_context.py
",
line 915, in getFile
    return getFile(name, relative or self.pathDirectory)
  File
"/usr/lib/python2.5/site-packages/pisa-3.0.29-py2.5.egg/sx/pisa3/pisa_util.py",
line 424, in getFile
    file = pisaFileObject(*a, **kw)
  File
"/usr/lib/python2.5/site-packages/pisa-3.0.29-py2.5.egg/sx/pisa3/pisa_util.py",
line 382, in __init__
    urlResponse = urllib2.urlopen(uri)
  File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
*** ERRORS OCCURED

Original issue reported on code.google.com by gabriel....@gmail.com on 25 Dec 2008 at 8:34

GoogleCodeExporter commented 9 years ago
I see. Another user reported me, that this has to do with the exclusion of 
Python
navigator id's. I will consider switching to httplib instead of urllib2. Thanks.

Original comment by dirk.holtwick on 5 Jan 2009 at 6:16

GoogleCodeExporter commented 9 years ago
This will work in 3.0.30. Switched to httplib

Original comment by dirk.holtwick on 26 Mar 2009 at 5:55

GoogleCodeExporter commented 9 years ago
This seems to still be happening.

Randomly I will get this error when trying to generate a pdf:
('error', 0, 'Tag handling', 'u\'<td id="imageBox" width="589"> <img 
alt="Property Image" height="474" 
src="http://media.landvest.com/pics/property/822/0///crop/589,474/" 
width="599"/> </td>\'')
('warning', 0, 'Need a valid file name!', 'u\'<img alt="Property Image" 
height="474" 
src="http://media.landvest.com/pics/property/822/0///crop/589,474/" 
width="599"/>\'')

This are a raw print out from pisaContext.log when raise_exception is False on 
pisaDocument instance. Not sure what has caused 
this as it was running smooth for a while now and this just started to happen.

Version is 3.0.32
Running on RHEL 5 with Python2.5

Original comment by nerdynick on 16 Sep 2009 at 7:10