#error：underlying buffer has been detached #Envirment: Docker, Django3.2.5, pyhton3.6
Scenario: the above error occurs every time I execute Python 3 manage.py runserver 0.0.0.0:8000
Finally, the problem was that I introduced the following code into some Python files
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.detach()) # System current default encoding format
However, this code is a habitual way of writing the default output code in Python 2.
Solution: delete all sys.stdout in the .Py file
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1:
- [Solved] Unicode decode error in the background when the robot framework is running
- When debugging stored procedure, ora-20000: oru-10027: buffer overflow is prompted
- After the JVM is started, setting the system property file.encoding again cannot affect the default encoding of the system & sun.jnu.encoding
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- Python Error: Non-UTF-8 code starting with ‘\xe7’ [How to Solve]
- TypeError: the JSON object must be str, not ‘bytes’
- [Ubuntu18.04] Docker Start Error: Got permission denied while trying to connect to the Docker daemon socket
- [Solved] Docker ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket – is it running?
- [Solved] Docker Starup Error: Failed to start Docker Application Container Engine.