Using python to make restful api server, on home computer and work computer, now I encounter some strange problems
Use postman to send a post request. The value of the key received by the home computer will be found to be u'Chinese' when debugging is interrupted. However, if it is a computer at work, it will be displayed as 'Chinese' when debugging is interrupted. Yes, the difference is whether there is a u in front or not. This difference between the two computers almost makes me depressed,
I am using python 3.61 64bit, and the environment is synchronized using requirements.txt. The installed libraries should be consistent. Why does this happen? how to solve this problem? The difference between the two computers is killing me
The code should be the same, use github to synchronize the warehouse of two computers
Is it related to the settings of pycharm I use?
Py3’s strings are unicode by default, regardless of whether there is a u prefix or not
Are the Python versions of the two environments inconsistent? Those with u are generally generated by py2. Just change the Python version to py3