title: ValueError: underlying buffer has been detached when i run python manager.py makemigrations
body: <p><a href="https://i.stack.imgur.com/43TtI.png" rel="nofollow noreferrer">error 1</a>
  when i run python manager.py makemigrations , the problem as the picture.</p>
  
  <p>i check the django source code, find the problem code at here picture 2，
  it can work when i note this line:self._out.write(style_func(msg)).
  I don't know how make this problem.
  <a href="https://i.stack.imgur.com/oHdE0.png" rel="nofollow noreferrer">django source code</a></p>