Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

3

Webkit Error: No such file or directory

By
Mohammad Zi
on 7/25/13, 6:05 AM 8,343 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 -

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

7Gates Interactive Technologies, Erdem Uney
on 1/27/14, 1:02 PM

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

Atchuthan - Technical Consultant, Sodexis Inc
on 6/10/15, 1:44 AM
0
Aristóbulo Meneses
On 4/15/16, 3:39 AM

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.

0

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 10/11/13, 4:13 PM

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

Thanks.

0

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 7/25/13, 7:14 AM

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 ...

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

Mohammad Zi
on 7/25/13, 7:34 AM

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.

Mohammad Zi
on 7/25/13, 7:40 AM
0

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 10/11/13, 6:34 PM

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.

Mathias Neef
on 10/12/13, 4:47 AM
0
Laurent Olivier
On 10/13/13, 4:59 AM

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

0
Mathias Neef
On 10/9/13, 10:11 AM

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.

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

Mathias Neef
on 10/10/13, 6:00 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 7/25/13, 6:05 AM
Seen: 8343 times
Last updated: 4/15/16, 3:39 AM