Hi i have using tabula python library in odoo 12 version and i got an error file not found error
df = tabula.read_pdf ((pdf)) File "/home/arun/.local/lib/python3.5/site-packages/tabula/wrapper.py", line 105, in read_pdf raise FileNotFoundError (errno.ENOENT, os .strerror (errno.ENOENT), path)
from odoo import api, models, fields, _ from odoo.exceptions import UserError, ValidationError import logging matter errno import from io import BytesIO import tabula _logger = logging.getLogger (__ name__) class ImportSalePdf (models.TransientModel): _name = 'import.sale.pdf' _description = 'Import Sale' file_upload_pdf = fields.Binary ('FileUpload', attachment = True) generate_csv = fields.Binary ('CSV File') def generate_pdf_csv (self): pdf = self.file_upload_pdf df = tabula.read_pdf ((pdf)) csv = 'out.csv' df.to_csv (csv, sep = '\ t', encoding = 'utf-8') attachment_value = { 'name': csv.filename, 'datas': base64.encodestring (csv.read ()), 'datas_fname': csv.filename, 'res_model': self._name, 'res_id': self.id, } attachment_id = self.env ['ir.attachment']. sudo (). create (attachment_value)\Python-3.x