deidentify icon indicating copy to clipboard operation
deidentify copied to clipboard

Issue with Demo.py: AttributeError: module 'deduce' has no attribute 'lookup_lists'. Did you mean: 'lookup_sets'?

Open ahmb opened this issue 1 year ago • 3 comments

File "/usr/local/lib/python3.10/dist-packages/deidentify/taggers/init.py", line 1, in from .deduce_tagger import DeduceTagger File "/usr/local/lib/python3.10/dist-packages/deidentify/taggers/deduce_tagger.py", line 4, in from deidentify.methods.deduce import run_deduce File "/usr/local/lib/python3.10/dist-packages/deidentify/methods/deduce/run_deduce.py", line 14, in NAME_PREFIX_REGEX = re.compile(r'({}).?\s*'.format('|'.join(deduce.lookup_lists.PREFIXES)), AttributeError: module 'deduce' has no attribute 'lookup_lists'. Did you mean: 'lookup_sets'?

ahmb avatar May 14 '23 18:05 ahmb

Name: deidentify Version: 0.7.3

ahmb avatar May 14 '23 18:05 ahmb

Could you please try a pip install -U deduce>=1.0.2,<2 (see #69).

jantrienes avatar May 15 '23 06:05 jantrienes

Hi @jantrienes

I faced a similar issue with the following traceback :

Traceback (most recent call last): File "/Users/akhil/Downloads/touch.py", line 2, in from deidentify.taggers import FlairTagger File "/opt/homebrew/lib/python3.10/site-packages/deidentify/taggers/init.py", line 1, in from .deduce_tagger import DeduceTagger File "/opt/homebrew/lib/python3.10/site-packages/deidentify/taggers/deduce_tagger.py", line 4, in from deidentify.methods.deduce import run_deduce File "/opt/homebrew/lib/python3.10/site-packages/deidentify/methods/deduce/run_deduce.py", line 14, in NAME_PREFIX_REGEX = re.compile(r'({}).?\s*'.format('|'.join(deduce.lookup_lists.PREFIXES)), AttributeError: module 'deduce' has no attribute 'lookup_lists'

The solution you suggested resolved the issue! Thanks!

ar2427 avatar Jul 13 '24 20:07 ar2427