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

AttributeError: 'Generator' object has no attribute 'phoneNumber' #12

Open
show0k opened this issue Aug 3, 2014 · 1 comment
Open

Comments

@show0k
Copy link

show0k commented Aug 3, 2014

I've a custom User model with a field
phone_number = models.CharField( max_length=20)

Traceback (most recent call last):
File "", line 1, in
File "/dev/local/lib/python2.7/site-packages/django_faker/populator.py", line 163, in execute
insertedEntities[klass].append( self.entities[klass].execute(using, insertedEntities) )
File "/dev/local/lib/python2.7/site-packages/django_faker/populator.py", line 104, in execute
value = format(insertedEntities) if hasattr(format,'call') else format
File "/dev/local/lib/python2.7/site-packages/django_faker/guessers.py", line 25, in
if name in ('phone_number','phonenumber','phone'): return lambda x:generator.phoneNumber()
AttributeError: 'Generator' object has no attribute 'phoneNumber'

@Brobin
Copy link

Brobin commented Apr 21, 2015

Issue with faker's API changing. It should be return lambda x: generator.phone_number(). I'm making some fixed on my fork if you're interested.

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

2 participants