2023年3月14日Error: UnicodeEncodeError: 'ascii'codeccan't encode character '\u5728' in position 6: ordinal not in range(128) 解决方法: importcodecs importsys sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
This usage is deprecated in favor of PyUnicode_New(), and will be removed in Python 3.12. PyObject *PyUnicode_FromString(const char *u) Return value: New reference. 根据UTF-8 编码的以空值结束的字符缓冲区 u 创建一个 Unicode 对象。 PyObject* PyUnicode_FromFormat(const char *format, .....