-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
FastAPI: AttributeError: 'Provide' object has no attribute 'test_message' #729
Comments
Have you wired the modules? FYI I'm a noob myself 😊 |
Not the most familiar with injection with FastAPI, but you can try with dependency-injector 4.38.0, see here: #672 |
Correct, I moved the APIs in another module and added |
#folder structure app wiring_config = WiringConfiguration(packages=['app']) #not working
wiring_config = WiringConfiguration(packages=['app.llm.adapter.input.api.v1]) #not working
wiring_config = WiringConfiguration(packages=['app.llm.adapter.input.api.v1.llm']) #working ✅ path to file(this file is router which contain @injection decoration) modules argument also working same |
I've used If I wire module The correct solution is to use |
Hello folks! I get the error
AttributeError: 'Provide' object has no attribute 'test_message'
This is the code
containers.py
conversationBaseService.py
conversationService.py
main.py
Library versions:
Name: dependency-injector
Version: 4.41.0
Name: fastapi
Version: 0.100.1
Did I forget to configure something? I checked the documentation, but I didn't find a solution. Actually, the published example doesn't seems to be correct/updated.
The text was updated successfully, but these errors were encountered: