Pandora icon indicating copy to clipboard operation
Pandora copied to clipboard

Encode bugs

Open shiqinfeng1 opened this issue 5 years ago • 1 comments

When running Maya, some alarms will be generated, including some chinese-encoded characters. It encoded by gb2312 like this:

'\xed\xce\xf3: line 1: RuntimeError: file <maya console> line 1: \xd4\xda MAYA_PLUG_IN_PATH \xc9\xcf\xd5\xd2\xb2\xbb\xb5\xbd\xb2\xe5\xbc

when writing these warnings to file with writeWarning( ... ), it can not dump to json format.

maybe open file with specified encoding can fixs this bug:

with open(filename,'w',encoding='utf-8') as f_obj:

Last,I hope the author can consider the issue! thanks!

shiqinfeng1 avatar Jul 15 '19 02:07 shiqinfeng1

By the way, in function getExternalFiles(... ) of Maya, 'prjPath' name may not be "untitled". It maybe chinese-encoded characters: "无标题"。

shiqinfeng1 avatar Jul 15 '19 02:07 shiqinfeng1