File “D:\Program Files\Python37\lib\json\encoder.py”, line 179, in default
raise TypeError(f’Object of type {o.class.name} ’
TypeError: Object of type uint64 is not JSON serializable
127.0.0.1 - - [2021-07-02 21:42:32] “POST /nlp/v1/event_vec HTTP/1.1” 500 164 109.459295
“category”: “城市市容管理类”,
“classes”: “垃圾填埋场安全”,
“level”: “B”,
“wid”: “36”
有嵌套调用文件是,进来用相对路径组合的方式变成绝对路径避免报错
root_path = os.path.abspath(os.path.dirname(file))
dict_path = os.path.join(root_path, args.params_path)