I can't read the image from pdf (photos not shown on pdf)

HI again
I do no what’s wrong one more time
i made the code of the photo from what i understand from you like this :

i was put “company”
draw:name="image: (company.photo, 'image/png')"
because in the class python of creating this report , i was made the class like this :

    class CertificateReport(Report):
        __name__ = 'ModuleCertficates.party.certificate_report'


      
        @classmethod
        def _get_records(cls, ids, model, data):
            Move = Pool().get('party.certicate')

            clause = [

                ]
     

        @classmethod
        def get_context(cls, records, data):
            indx = 0
            report_context = super(CertificateReport, cls).get_context(records, data)

            Company = Pool().get('party.certicate')

            company = Company(data['company'])

            report_context['photo'] = company.photo

but after upgrading , there was error :

      Traceback (most recent call last):
      File "/trytond/wsgi.py", line 104, in dispatch_request
        return endpoint(request, **request.view_args)
      File "/trytond/protocols/dispatcher.py", line 48, in rpc
        request, database_name, *request.rpc_params)
      File "/trytond/wsgi.py", line 72, in auth_required
        return wrapped(*args, **kwargs)
      File "/trytond/protocols/wrappers.py", line 131, in wrapper
        return func(request, pool, *args, **kwargs)
      File "/trytond/protocols/dispatcher.py", line 197, in _dispatch
        result = rpc.result(meth(*c_args, **c_kwargs))
      File "/trytond/report/report.py", line 191, in execute
        oext, content = cls._execute(records, data, action_report)
      File "/trytond/report/report.py", line 217, in _execute
        return cls.convert(action, cls.render(action, report_context))
      File "/trytond/report/report.py", line 317, in render
        data = rel_report(**report_context).render()
      File "/site-packages/relatorio/templates/base.py", line 34, in render
        return self.serializer(self.events)
      File "/site-packages/relatorio/templates/opendocument.py", line 982, in __call__
        for kind, data, pos in stream:
      File "/site-packages/genshi/core.py", line 291, in _ensure
        for event in stream:
      File "/site-packages/genshi/filters/i18n.py", line 688, in __call__
        for kind, data, pos in stream:
      File "/site-packages/genshi/template/base.py", line 641, in _include
        for event in stream:
      File "/site-packages/genshi/template/markup.py", line 326, in _match
        for event in stream:
      File "/site-packages/genshi/template/base.py", line 581, in _flatten
        for kind, data, pos in stream:
      File "/site-packages/genshi/template/directives.py", line 171, in _generate
        attrs = _eval_expr(self.expr, ctxt, vars)
      File "/site-packages/genshi/template/base.py", line 291, in _eval_expr
        retval = expr.evaluate(ctxt)
      File "/site-packages/genshi/template/eval.py", line 160, in evaluate
        return eval(self.code, _globals, {'__data__': data})
      File "<string>", line 534, in <Expression '__relatorio_make_href(__relatorio_get_cache(139912478557128))'>
      File "/site-packages/relatorio/templates/opendocument.py", line 124, in __call__
        bitstream = bitstream.generate(**self.context).render()
    AttributeError: 'NoneType' object has no attribute 'generate'