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

AttributeError: module 'drafthorse' has no attribute 'models' #68

Open
ThomDietrich opened this issue Jan 31, 2025 · 1 comment
Open

Comments

@ThomDietrich
Copy link

ThomDietrich commented Jan 31, 2025

Hey there, as I want to use your library in a bigger context I'd prefer to call everything with absolute identifiers.

import drafthorse
doc = drafthorse.models.document.Document()

Sadly this throws

AttributeError: module 'drafthorse' has no attribute 'models'

How could I still make this work without hand-picking the imports? Thanks!

@mfit
Copy link

mfit commented Feb 4, 2025

I believe the reason would be that the drafthorse module does not explicitly import its submodules.

However one could still use it like this:

import drafthorse.models.document
doc = drafthorse.models.document.Document()

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

2 participants