I have recently encouter this error multiple time using Python 3.12 and the answer is in the documentation :
For version of Python 3.12 and later you need to use python -m manage runserver --nothreading Concurrent requests don’t work with the profiling panel.