You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
classOuterClass(object):
def__init__(self, inner_class):
self.inner_class=inner_classclassInnerClass(object):
def__init__(self):
self.forty_two=42# somewhere else in my code:obj_graph=pinject.new_object_graph(
modules=[core, api] # workaround
)
outer_class=obj_graph.provide(OuterClass)
Raises this exception: {NothingInjectableForArgError} when injecting OuterClass.__init__ at C:\Users\me\PycharmProjects\MyProject\api\views.py:32, nothing injectable for the binding name "inner_class" (unannotated)
I even tried to add this line before requesting the outer_class:
inner_class=obj_graph.provide(InnerClass)
It knows how to create it! pinject should now inject that instance to create the outer_class, but it doesn't.
Any idea?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm really struggling with pinject, even the basic example isn't working for me.
I'm on Windows 10 with python 3.7.3, pinject 0.12.6
My first try resulted in an exception:
ModuleNotFoundError: No module named '_gdbm'
So I applied a workaround I found in issue #22
Now this simple code:
Raises this exception:
{NothingInjectableForArgError} when injecting OuterClass.__init__ at C:\Users\me\PycharmProjects\MyProject\api\views.py:32, nothing injectable for the binding name "inner_class" (unannotated)
I even tried to add this line before requesting the outer_class:
It knows how to create it! pinject should now inject that instance to create the outer_class, but it doesn't.
Any idea?
The text was updated successfully, but these errors were encountered: