This question has been flagged
12 Replies
16570 Views

I tried to open a sample webkit report but I am encountering a new error message.

I am enclosing the server and client side.

I am not sure from where I need to start. All components seem to be installed properly.

Thanks.

Client side error:

2 No such file or directory

(<type 'exceptions.oserror'="">, OSError(2, 'No such file or directory'), <traceback object="" at="" 0x7fd540a16830="">)

Terminal (Server side)

3 09:29:49] "POST /web/dataset/call_button HTTP/1.1" 200 -
2013-07-25 09:29:49,883 54841 ERROR db financial.reports.webkit: cannot remove file /tmp/webkit.tmp.tq1d5j.pdf: [Errno 2] No such file or directory: '/tmp/webkit.tmp.tq1d5j.pdf'
2013-07-25 09:29:49,883 54841 ERROR db openerp.service.web_services: Exception: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/opt/openerp/server/openerp/addons/report_webkit/webkit_report.py", line 333, in create
    result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
  File "/opt/openerp/server/openerp/report/report_sxw.py", line 513, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/opt/openerp/server/openerp/addons/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 233, in create_single_pdf
    pdf = self.generate_pdf(bin, report_xml, head, foot, htmls)
  File "/opt/openerp/server/openerp/addons/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 121, in generate_pdf
    status = subprocess.call(command, stderr=stderr_fd)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2013-07-25 09:29:49,899 54841 ERROR db openerp.netsvc: 2
No such file or directory
(<type 'exceptions.OSError'>, OSError(2, 'No such file or directory'), <traceback object at 0x7fd4ac7f9ea8>)
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/opt/openerp/server/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/opt/openerp/server/openerp/netsvc.py", line 72, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'2\nNo such file or directory', (<type 'exceptions.OSError'>, OSError(2, 'No such file or directory'), <traceback object at 0x7fd4ac7f9ea8>))
2013-07-25 09:29:49,902 54841 INFO db werkzeug: 127.0.0.1 - - [25/Jul/2013 09:29:49] "POST /web/report HTTP/1.1" 500 -
Avatar
Discard

Did you able to solve the problem? I got the same thing...

Hi Mohammed, I am also facing the same issue. Were you able to solve it? If yes, please let us know.

Best Answer

Just in case anyone else gets this error, here is how I solved it for an Odoo 6.1 instance:


  1. Go to http://download.gna.org/wkhtmltopdf/0.12/0.12.1/ and download the right package for your distribution.

  2. Install it with dpkg -i (on Debian or Ubuntu) 

  3. Go to System Parameters and check your webkit_path, it should match your wkhtmltopdf binary path. To know where is it on your system: which wkhtmltopdf


Hope it helps.

Avatar
Discard
Best Answer

Same error. I'm running 7.0-20130918-231035 on Debian 7.1 and have installed report_webkit and account_financial_report_webkit. wkhtmltopdf (static/amd64) lays in /usr/local/bin. webkit_paht is defined to /usr/local/bin.

Error is:

financial.reports.webkit: cannot remove file /tmp/webkit.tmp.BNXnn5.pdf: [Errno 2] No such file or directory: '/tmp/webkit.tmp.BNXnn5.pdf'
2013-10-09 10:46:40,268 5930 ERROR bemavino_live_20130919 openerp.service.web_services: Exception: [Errno 13] Permission denied
Traceback (most recent call last):
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/opt/openerp/server/openerp/addons/report_webkit/webkit_report.py", line 340, in create
    result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/report/report_sxw.py", line 513, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/opt/openerp/server/openerp/addons/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 233, in create_single_pdf
    pdf = self.generate_pdf(bin, report_xml, head, foot, htmls)
  File "/opt/openerp/server/openerp/addons/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 121, in generate_pdf
    status = subprocess.call(command, stderr=stderr_fd)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
2013-10-09 10:46:40,497 5930 ERROR bemavino_live_20130919 openerp.netsvc: 13
Permission denied
(<type 'exceptions.OSError'>, OSError(13, 'Permission denied'), <traceback object at 0x56d0878>)
Traceback (most recent call last):
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/opt/openerp/openerp-7.0-20130918-231035/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'13\nPermission denied', (<type 'exceptions.OSError'>, OSError(13, 'Permission denied'), <traceback object at 0x56d0878>))

So it seems that permission to /tmp folder is denied. Tried with full access to /tmp and /addons folder wiht no changes to the error. So I can't find out what went wrong at the moment.

I don't think that this is Bug#1102991.

Avatar
Discard

Now I reproduced this error on a newly made local system with test data.

Best Answer

One has to make sure to use wkhtmltopdf version 0.11 min.

Thanks.

Avatar
Discard
Best Answer

Try this guide:

Google Docs - Webkit Installation Guide OpenERP7

Avatar
Discard

Thank you for your reply. I've done all things from the guide before your post, so I checked twice. Everything looks right. wkthmltopdf have full permissions to every user. But the error stays. The debug modus for html output works fine.

Best Answer

Hi,

Be aware of giving the path WITH the name of the wkhtmltopdf in the webkit_path Eg /usr/local/bin/wkhtmltopdf-i386 in my case.

Hope it helps

Avatar
Discard
Best Answer

You might have encountered Bug#1102991. If this is so, a workaround is to grant write access to the addons directory.

PS: you didn't give a proper traceback to let us figure out exactly where the proble is ...

Avatar
Discard
Author

@Daniel, Thanks for your feedback and I updated the question just now.

Author

I have given full access right to all users of my server to read and write in the addons directory but the error still exist.