On 29-12-2010 21:37, Arun K.Rajeevan wrote:
> great as far as 25 page pdf is in consideration. next time a simple text file
> is good enough.
sorry about the large file, but I thought to give as much information as
possible
> how the page get rendered?
Mozilla printing to pdf
> using generic.html or is it have a custom view file?
> And what's the controller returns?
>
> btw which version of web2py you are using?
don't know,
but got the problem,
the strings are derived from a completely other website,
with the use of BeautifulSoup,
and then strings are of type <class 'BeautifulSoup.NavigableString'>
so typecasting them as unicode solves the problem.
thanks
Stef Mientki
>
> ---------------------------------------------------------------------------------------------------------------------------------------
> for others:
>
> there's these lines in trace back
>
> File "P:\Web2PY\web2py_src\web2py\gluon\html.py", line 118, in xmlescape
> data = data.encode('utf8', 'xmlcharrefreplace')
> TypeError: encode() takes at most 2 arguments (3 given)
>
> Detailed traceback description
> Exception: <type 'exceptions.TypeError'>(encode() takes at most 2
> arguments (3 given))
> Python 2.6.4: P:\Python26\python.exe
>
>