health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] ModuleNotFoundError: No module named 'magic'


From: Armand MPASSY-NZOUMBA
Subject: [Health-dev] ModuleNotFoundError: No module named 'magic'
Date: Wed, 3 Jul 2019 01:59:26 +0000 (UTC)

Dear all,

I am getting the following error while trying to post an invoice:

zipfile.BadZipFile: File is not a zip file
ModuleNotFoundError: No module named 'magic'


GNU Health version: 3.4
Database: Online demo database


Traceback (most recent call last):
  File "/relatorio/templates/opendocument.py", line 884, in get_zip_file
    return zipfile.ZipFile(source)
  File "/zipfile.py", line 1108, in __init__
    self._RealGetContents()
  File "/zipfile.py", line 1175, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 70, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/wrapt/wrappers.py", line 523, in __call__
    args, kwargs)
  File "/trytond/wsgi.py", line 41, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 110, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 165, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/modules/purchase/invoice.py", line 23, in wrapper
    func(cls, invoices)
  File "/trytond/modules/purchase/invoice.py", line 99, in post
    super(Invoice, cls).post(invoices)
  File "/trytond/model/modelview.py", line 634, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/trytond/model/workflow.py", line 36, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/trytond/modules/account_invoice/invoice.py", line 1355, in post
    invoice.print_invoice()
  File "/trytond/modules/account_invoice/invoice.py", line 1264, in print_invoice
    InvoiceReport.execute([self.id], {})
  File "/trytond/modules/account_invoice/invoice.py", line 2374, in execute
    result = super(InvoiceReport, cls).execute(ids, data)
  File "/trytond/report/report.py", line 173, in execute
    oext, content = cls._execute(records, data, action_report)
  File "/trytond/modules/account_invoice/invoice.py", line 2355, in _execute
    result = super(InvoiceReport, cls)._execute(records, data, action)
  File "/trytond/report/report.py", line 181, in _execute
    return cls.convert(action, cls.render(action, report_context))
  File "/trytond/report/report.py", line 273, in render
    data = "">  File "/relatorio/reporting.py", line 121, in __call__
    template = self.tmpl_loader.load(self.fpath, self.mimetype)
  File "/relatorio/reporting.py", line 81, in load
    path, cls=cls, relative_to=relative_to)
  File "/genshi/template/loader.py", line 236, in load
    filename, encoding=encoding)
  File "/genshi/template/loader.py", line 274, in _instantiate
    allow_exec=self.allow_exec)
  File "/relatorio/templates/opendocument.py", line 268, in __init__
    encoding, lookup, allow_exec)
  File "/genshi/template/markup.py", line 67, in __init__
    allow_exec=allow_exec)
  File "/genshi/template/base.py", line 418, in __init__
    self._stream = self._parse(source, encoding)
  File "/relatorio/templates/opendocument.py", line 289, in _parse
    zf = get_zip_file(source)
  File "/relatorio/templates/opendocument.py", line 889, in get_zip_file
    return zipfile.ZipFile(fod2od(source))
  File "/relatorio/templates/opendocument.py", line 925, in fod2od
    child, fodt_root.nsmap, start=len(images)))
  File "/relatorio/templates/opendocument.py", line 947, in extract_images
    import magic
ModuleNotFoundError: No module named 'magic'


Any assistance will

Kind regards,

Armand


reply via email to

[Prev in Thread] Current Thread [Next in Thread]