Community mailing list archives

community@mail.odoo.com

Re: error in reportlab

by
Ronald Wopereis
- 09/26/2015 19:19:59
hi all,

i found the problem, although i haven't solved it (yet)

(1) in /tmp , the .html file is filled correctly, and the .pdf file is empty.
(2) upon running wkhtmltopdf manually, the .pdf file is generated correctly,
(3) but then wkhtmltopdf exits with this error:

"Exit with code 1 due to network error: ContentNotFoundError"

thx, 
Ron


2015-09-26 20:34 GMT+02:00 Atul Patel <atp@odoo.com>:
Hello,
This problem is fonts dependency issue (times roman) not properly installed . 

Try this step . This will resolve barcode issue for qweb report. 

Download this pfbfer.zip, and extract it.

Now put all the files of this pfbfer in...

/usr/lib/python2.7/dist-packages/reportlab/fonts/(put the files)

If the fonts folder is not available in reportlab directory then create it and put all the font-files in fonts from the extract folder pfbfer.


Thanks 

Sent from my iPhone

On 26-Sep-2015, at 8:53 PM, Ronald Wopereis <woepwoep@gmail.com> wrote:

this is the process that hangs up the system
odoo      9416     1  0 17:03 ?        00:00:00 /usr/local/bin/wkhtmltopdf --cookie session_id 923e013b9491b1aac842c7994b856f2dca29d9b
6 --quiet --page-width 211mm --page-height 296mm --margin-top 25 --dpi 80 --header-spacing 35 --margin-left 17 --margin-bottom 11 --ma
rgin-right 8 --orientation Portrait /tmp/report.body.tmp.eRvcVT.html /tmp/report.tmp.0cq9ov.pdf
od


after killing the process 9416, i see this:
>> ls -l /tmp
-rw------- 1 odoo odoo 234670 sep 26 17:03 report.body.tmp.eRvcVT.html
-rw------- 1 odoo odoo      0 sep 26 17:03 report.tmp.0cq9ov.pdf


when i open the report.body file with my browser,
i get my report just the way i wanted it, including barcodes.


i restored wkhtmltopdf to version 0.12.1
wkhtmltopdf --version
wkhtmltopdf 0.12.1 (with patched qt)


so what could exactly be the problem?
could it be the client no longer responding?

any suggestions?
thx, R


2015-09-26 11:37 GMT+02:00 Ronald Wopereis <woepwoep@gmail.com>:
​restarting server does not solve the problem.
what else can i try?
any suggestion is much appreciated
best regards, Ron​


2015-09-25 14:27 GMT+02:00 Houssine BAKKALI <houssine.bakkali@gmail.com>:
I recently got this error on some standard accounting report that was working well until the error arised and restarting the server solved the problem.

2015-09-25 0:08 GMT+02:00 Ronald Wopereis <woepwoep@gmail.com>:
hi all,

i get following error in reportlab when printing a barcode label :

  File "/usr/share/pyshared/reportlab/graphics/renderPM.py", line 221, in _setFont
    raise RenderPMError, "Can't setFont(%s) missing the T1 files?\nOriginally %s: %s" % (fontName,s1,s2)
RenderPMError: Can't setFont(Times-Roman) missing the T1 files?
Originally <type 'exceptions.TypeError'>: makeT1Font() argument 2 must be string, not None

creating and filling the reportlab/fonts directory i tried, but then the odoo server hangs on the report, and won't come back unless i delete the fonts subdir and reboot the server.


to reproduce, i only need to do this:

and it gives me a 500 error.
in the odoo-error.log appears the very same error.


any suggestions would be very much welcome.
thx, Ron

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe