You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
修改在执行报错了
D:>datafaker file D:\ out.txt 10 --meta meta.txt --format json
Exception in thread Thread-2:
Traceback (most recent call last):
File "D:\dev\python\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "D:\dev\python\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "D:\dev\python\lib\site-packages\datafaker\dbs\basedb.py", line 122, in save
self.save_data(lines)
File "D:\dev\python\lib\site-packages\datafaker\dbs\filedb.py", line 24, in save_data
save2file(items, filepath)
File "D:\dev\python\lib\site-packages\datafaker\utils.py", line 26, in save2file
fp.writelines(items)
UnicodeEncodeError: 'gbk' codec can't encode character '\u3dab' in position 41: illegal multibyte sequence
已修复:
修改utils.py 中的 json.dumps(map)
为
json.dumps(map, ensure_ascii=False)
Originally posted by @chenzhang88 in #78 (comment)
The text was updated successfully, but these errors were encountered: