gangly / datafaker

Datafaker is a large-scale test data and flow test data generation tool. Datafaker fakes data and inserts to varied data sources. 测试数据生成工具
625 stars 168 forks source link

windows执行datafaker报错 #24

Open Annadong1106 opened 4 years ago

Annadong1106 commented 4 years ago

python版本:3.6.8 datafaker版本:0.6.4 在执行【使用举例.md】中向mysql造数时候,报如下错误:

D:\datafaker>datafaker rdb mysqlclient://root:root@localhost:3600/test?charset=utf8 stu 10 --outprint --meta meta.txt --outspliter ',,' Traceback (most recent call last): File "D:\python\lib\site-packages\datafaker\cli.py", line 77, in main db = load_db_class(args.dbtype)(args) File "D:\python\lib\site-packages\datafaker\dbs\basedb.py", line 18, in init self.schema = self.parse_schema() File "D:\python\lib\site-packages\datafaker\dbs\basedb.py", line 127, in parse_schema schema = self.parse_meta_schema() File "D:\python\lib\site-packages\datafaker\dbs\basedb.py", line 137, in parse_meta_schema rows = self.construct_meta_rows() File "D:\python\lib\site-packages\datafaker\dbs\basedb.py", line 201, in construct_meta_rows lines = read_file_lines(filepath) File "D:\python\lib\site-packages\datafaker\utils.py", line 84, in read_file_lines lines = fp.read().splitlines() File "D:\python\lib\codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd7 in position 9: invalid continuation byte

'utf-8' codec can't decode byte 0xd7 in position 9: invalid continuation byte Exception ignored in: <bound method RdbDB.del of <datafaker.dbs.rdbdb.RdbDB object at 0x000002171485B6D8>> Traceback (most recent call last): File "D:\python\lib\site-packages\datafaker\dbs\rdbdb.py", line 14, in del self.session.close() AttributeError: 'RdbDB' object has no attribute 'session' @gangly 麻烦您看一下是什么问题?

gangly commented 4 years ago

用最新版本0.7.0试试

Annadong1106 commented 4 years ago

用最新版本0.7.0试试

更新到0.7.0了,还是报错欸,一样的错误

gangly commented 4 years ago

用最新版本0.7.0试试

更新到0.7.0了,还是报错欸,一样的错误

bug已修复,请更新到0.7.1