【Ubuntu20.04】odoo打印控件报错 FileNotFoundError: [Errno 2] No such file or directory: ‘libreoffice‘

4 篇文章 0 订阅

报错日志:

Traceback (most recent call last):
  File "/odoo16/gooderp16/report_docx/controllers/main.py", line 95, in report_download
    response = self.report_routes(
  File "/odoo16/src/odoo/http.py", line 697, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/odoo16/gooderp16/report_docx/controllers/main.py", line 59, in report_routes
    res, filetype = action_docx_report.render_docx(docids, data)
  File "/odoo16/gooderp16/report_docx/models/ir_actions.py", line 43, in render_docx
    return docx.create_report(res_ids, data)
  File "/odoo16/gooderp16/report_docx/report/report_docx.py", line 186, in create_report
    temp_file = self.render_to_pdf(temp_out_file)
  File "/odoo16/gooderp16/report_docx/report/report_docx.py", line 204, in render_to_pdf
    process = subprocess.run(
  File "/usr/local/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'libreoffice'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://121.40.85.37:8069/web/assets/610-1194550/web.assets_backend.min.js:985:163)
    at decoder.onload (http://121.40.85.37:8069/web/assets/610-1194550/web.assets_backend.min.js:973:7)

报错问题:

== FileNotFoundError: [Errno 2] No such file or directory: ‘libreoffice’ ==

ubuntu18安装libreoffice

sudo apt-get install libreoffice  
  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值