Giter Site home page Giter Site logo

Comments (8)

alexis-via avatar alexis-via commented on July 19, 2024 1

It seems that the same error can have very different causes. In my case, I get the following error when trying to get the PDF version of an accounting report from account_financial_report_webkit :

2016-04-11 20:57:26,312 17050 INFO absamad werkzeug: 192.168.10.201 - - [11/Apr/2016 20:57:26] "POST /web/dataset/call_kw/account.journal/read HTTP/1.0" 200 -
2016-04-11 20:57:26,474 17050 WARNING absamad openerp.pooler: openerp.pooler.get_db_and_pool() is deprecated.
2016-04-11 20:57:26,488 17050 WARNING absamad openerp.pooler: openerp.pooler.get_db_and_pool() is deprecated.
2016-04-11 20:57:27,122 17050 ERROR absamad openerp.service.report: Exception: execv() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/openerp/erp/odoo/openerp/service/report.py", line 93, in go
    result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
  File "/home/openerp/erp/odoo/openerp/report/__init__.py", line 40, in render_report
    return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
  File "/home/openerp/erp/odoo/openerp/api.py", line 256, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/openerp/erp/odoo/openerp/addons/base/ir/ir_actions.py", line 156, in render_report
    return new_report.create(cr, uid, res_ids, data, context)
  File "/home/openerp/erp/odoo/addons/report_webkit/webkit_report.py", line 377, in create
    result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
  File "/home/openerp/erp/odoo/openerp/report/report_sxw.py", line 464, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/home/openerp/erp/account-financial-reporting/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 277, in create_single_pdf
    parser_instance=parser_instance)
  File "/home/openerp/erp/account-financial-reporting/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 153, in generate_pdf
    status = subprocess.call(command, stderr=stderr_fd)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings
2016-04-11 20:57:27,388 17050 ERROR absamad openerp.addons.web.controllers.main: An exception occured during an http request
Traceback (most recent call last):
  File "/home/openerp/erp/odoo/addons/web/controllers/main.py", line 70, in wrap
    return f(*args, **kwargs)
  File "/home/openerp/erp/odoo/addons/web/controllers/main.py", line 1586, in index
    request.session.db, request.session.uid, request.session.password, report_id)
  File "/home/openerp/erp/odoo/openerp/http.py", line 879, in proxy_method
    result = dispatch_rpc(self.service_name, method, args)
  File "/home/openerp/erp/odoo/openerp/http.py", line 115, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/openerp/erp/odoo/openerp/service/report.py", line 34, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/erp/report-print-send/base_report_to_printer/report_service.py", line 86, in exp_report_get
    return original_exp_report_get(db, uid, report_id)
  File "/home/openerp/erp/odoo/openerp/service/report.py", line 141, in exp_report_get
    return _check_report(report_id)
  File "/home/openerp/erp/odoo/openerp/service/report.py", line 119, in _check_report
    raise openerp.osv.orm.except_orm(exc.message, exc.traceback)
except_orm: (u'execv() arg 2 must contain only strings', (<type 'exceptions.TypeError'>, TypeError('execv() arg 2 must contain only strings',), <traceback object at 0x7f8d4763e200>))

The very strange thing is that this bug suddenly appears after several weeks of usage in production without problems, and I get it on all the webkit financial reports. Then, I restart the server and the problem disappears. I never succeded to reproduce this bug in a test environment.

from account-financial-reporting.

ccarly avatar ccarly commented on July 19, 2024

Fixed, access permision

from account-financial-reporting.

jlaloux avatar jlaloux commented on July 19, 2024

Hi,

What was you access permission problem? I encounter exactly the same issue

Thank you

from account-financial-reporting.

adrienpeiffer avatar adrienpeiffer commented on July 19, 2024

@ccarly Are you sure that this is a permission problem ?
We encounter the same problem caused by special character in the title of the report
Related issue : #57

from account-financial-reporting.

jlaloux avatar jlaloux commented on July 19, 2024

No that's not a permission problem. I also found that the source of the problem was a special character in the header of the report.

from account-financial-reporting.

luisfqba avatar luisfqba commented on July 19, 2024

Hello @jlaloux please what special character is, where I can find this to fix it?

from account-financial-reporting.

jlaloux avatar jlaloux commented on July 19, 2024

For me it was the french translation of the report name "Balance âgée des tiers”. So if you search into the translation of "Aged Partner Balanced", you will find the problematic characters for the language you try to print the report

image

I only had this issue on my server. Can't reproduce it on my local so if you need to keep these problematic characters, this is an environment problem. Maybe a Python library version?

If the special characters are not important for you, simply remove them like i did in the print screen ^^

from account-financial-reporting.

adrienpeiffer avatar adrienpeiffer commented on July 19, 2024

A solution is provided in #57

from account-financial-reporting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.