Yes, this kind of tool exists.
Most of them have some advanced features. For example, you can usually store not only exception stack traces or error messages, but can also just write down a problem manually and add it. That makes not much difference, because bugs are not uniform anyway.
With handling of marking exceptions as done, and lots of other related features, like commenting on the problem, we have a typical bug tracker:
As you asked for Python,
trac comes to mind.
See Wikipedia on trac for example.
It's a web application that can easily be hosted locally. Licensed similar to the BSD license - that means it is more "free" than most other FOSS software.
There are a lot of other similar systems to choose from of course.
Note that there is one important, hard problem with storing errors automatically: Merging duplicate reports of the same bug - or even the same underlying problem with different symptoms.
That's hard anyway when done manually.
You can filter out exact duplicates of course. But only those.
Also, the system will create lots of irrelevant reports, which would never have been even concidered by a human.
It needsd lots of manual work to make sense of that database.
sentry, I think that is a solution in between log files and a bug tracker.
Someone should file most bugs manually, after ignoring lots of noise. But compared to using log files, that person has very good tools and structured data to use.
Of course there will be some cases where we can really just pipe a stack trace to the REST interface of
trac to create a new issue.
I can not easily make up an example for this, though...