Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql下处理int数据时,ValueError: empty range for randrange() (11,1, -10) #99

Open
WRYFans opened this issue Jan 28, 2022 · 0 comments

Comments

@WRYFans
Copy link

WRYFans commented Jan 28, 2022

datafaker.dbs.basedb下BaseDB类parse_schema_from_rows函数中
当cmd等于INT_TYPES,结果item字典中的args部分格式是[{value}, {unsigned}]
而之后在生成数据时调用datafaker.fakerdata下FackData类fake_int函数,参数是(min=None, max=None, unsigned=False)
这会导致错误

我用的是mysql,字段是int(11),其他数据源没考虑过,所以不能给出建议修改的方法
mysql下解决方案:
image

@WRYFans WRYFans changed the title 格式错误 mysql下处理int数据时,ValueError: empty range for randrange() (11,1, -10) Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant