Skip to content

Fix AttributeError for lx.data.* wildcard imports#181

Merged
aksg87 merged 1 commit intomainfrom
fix/ollama-data-attribute-error
Aug 23, 2025
Merged

Fix AttributeError for lx.data.* wildcard imports#181
aksg87 merged 1 commit intomainfrom
fix/ollama-data-attribute-error

Conversation

@aksg87
Copy link
Collaborator

@aksg87 aksg87 commented Aug 23, 2025

Description

Fix AttributeError when accessing lx.data.* classes due to missing __all__ declarations in core modules after v1.0.5 refactoring.

Fixes #92

Bug fix

How Has This Been Tested?

pytest tests/init_test.py -v  # 4 tests including 2 new compatibility tests
pytest tests -k "not live_api and not ollama_integration" -q  # 270 tests passing
tox -e format  # Passing
pylint --rcfile=.pylintrc langextract/core/data.py langextract/core/tokenizer.py  # No errors
pylint --rcfile=tests/.pylintrc tests/init_test.py  # 10.00/10

Checklist:

  • I have read and acknowledged Google's Open Source Code of conduct.
  • I have read the Contributing page, and I either signed the Google Individual CLA or am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have made any needed documentation changes, or noted in the linked issue(s) that documentation elsewhere needs updating.
  • I have added tests, or I have ensured existing tests cover the changes
  • I have followed Google's Python Style Guide and ran pylint over the affected code.

@aksg87 aksg87 marked this pull request as ready for review August 23, 2025 21:20
@aksg87 aksg87 merged commit 8b54f7f into main Aug 23, 2025
15 checks passed
andyxhadji pushed a commit to andyxhadji/langextract that referenced this pull request Aug 25, 2025
sinnaj pushed a commit to sinnaj/langextract that referenced this pull request Sep 3, 2025
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

Successfully merging this pull request may close these issues.

running with ollama example but comes with lib error saying AttributeError: module 'langextract' has no attribute 'data'

1 participant