[Top][All Lists]

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

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

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

Any assistance will

Kind regards,


reply via email to

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