No, #5788 is about a "No such revision message" error.
Here it's a different story:
The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.
In the trac log, at INFO level, there must be a line like:
repository_dir' has changed from /a/b/c to /x/y/z
Can you tell from that what's wrong?
(e.g. that could be a trac-admin resync
performed on a different environment than the one used by the web application, when both are sharing the same db but have different 'repository_dir' settings in their trac.ini)