faker icon indicating copy to clipboard operation
faker copied to clipboard

AttributeError: 'Generator' object has no attribute 'phone_number' error when using en_PH locale

Open zoltanmajor-seon opened this issue 9 months ago • 1 comments

I am not sure about the basic contract, but the en_PH locale does not provide the phone_number method.

reproduction steps:

fake = Faker('en_PH')
fake.phone_number()

Expected result: A valid Philippines phone number.

Actual result: AttributeError: 'Generator' object has no attribute 'phone_number'

zoltanmajor-seon avatar Mar 17 '25 17:03 zoltanmajor-seon

@zoltanmajor-seon You would need to use fake.mobile_number()

JohananOppongAmoateng avatar Mar 23 '25 19:03 JohananOppongAmoateng

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 22 '25 02:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 06 '25 02:07 github-actions[bot]