https://github.com/pytest-dev/pytest/blob/e4103cb02c9dd2cbda8ba44fce71b89e632bd2b0/src/_pytest/reports.py#L460
There may be no chain in reportdict["longrepr"].

@nicoddemus
@wy-z
So sorry for my imperence.
Once I encounter the error again, I will update the traceback.
Thanks for your response, I am your fan. @blueyed
@wy-z that's strange in the sense that hasn't appear sooner. Could you please post a reproducible example? Thanks
Also information about the pytest version, and from "pip freeze" would be required/useful.
pytest version
pytest==5.1.2
pytest-base-url==1.4.1
pytest-forked==1.0.2
pytest-html==2.0.0
pytest-instafail==0.4.1
pytest-metadata==1.8.0
pytest-repeat==0.8.0
pytest-rerunfailures==7.0
pytest-selenium==1.17.0
pytest-variables==1.8.0
pytest-xdist==1.29.0
python-dateutil==2.8.0
I wil try to provide a reproducible example tomorrow.
With my respectful regards. @nicoddemus
Sure, thank you!
It seems that the cause of this exception is pytest version mismatch.
Someone put some old version reports into redis causing the exception.
It's not an issue of pytest, I will close this.
Thanks again for your contribution. @nicoddemus @blueyed
Pytest is great!
Thanks @wy-z!