error'NoneType' object is not subscriptable

Hi , when i try to print the report i made (am using the version 5.8.1), i got this error :

Traceback (most recent call last):
  File "/trytond-5.8.7-py3.8.egg/trytond/", line 116, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond-5.8.7-py3.8.egg/trytond/protocols/", line 47, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond-5.8.7-py3.8.egg/trytond/", line 83, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond-5.8.7-py3.8.egg/trytond/protocols/", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond-5.8.7-py3.8.egg/trytond/protocols/", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond-5.8.7-py3.8.egg/trytond/report/", line 169, in execute
    suffix = '-'.join(r.rec_name for r in records[:5])
TypeError: 'NoneType' object is not subscriptable

any help please ; thank you.

It is strange. It looks like if Report._get_records has been override to return None instead of a list of record.

1 Like