CommonRegex icon indicating copy to clipboard operation
CommonRegex copied to clipboard

AttributeError: 'CommonRegex' object has no attribute 'ssn_number'

Open tlgevers opened this issue 3 years ago • 2 comments

I am attempting to parse the following test-data.txt with version commonregex==1.5.4:

2523088780
social security number: 428-34-4474
this is far less expensive than the alternative
114 jeffery street
usa
from commonregex import CommonRegex

with open('./test-data.txt') as data:
    parsed_text = CommonRegex(data.read())

and receiving the error:

parsed_text.ssn_number 

>>> AttributeError: 'CommonRegex' object has no attribute 'ssn_number'

no problems with emails, phones, etc:

>>> parsed_text.emails

['[email protected]']

Appreciate it

tlgevers avatar Feb 23 '22 14:02 tlgevers

@tlgevers This is because the package on pypi 1.5.4 was last published on August 29, 2014. If you install this directly from this github repo, your code will work

mhmcdonald avatar Mar 15 '22 19:03 mhmcdonald

thank you @mhmcdonald , was actually facing the same error with phones_with_exts. Going forward is pypi package going to be maintained? @madisonmay

brootware avatar Apr 13 '22 02:04 brootware