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

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

Open
ahmb opened this issue May 14, 2023 · 3 comments

Comments

@ahmb
Copy link

ahmb commented May 14, 2023

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
Copy link
Author

ahmb commented May 14, 2023

Name: deidentify
Version: 0.7.3

@jantrienes
Copy link
Collaborator

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

@ar2427
Copy link

ar2427 commented Jul 13, 2024

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!

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

3 participants