I have a py file like this, which errors out.
from world import acme
def make_stuff_happen():
acme.account.foo() # Works
acme.subscription.bar() # FAIL: "module 'object' has no attribute 'subscription'"
make_stuff_happen()
But this works!
from world import acme
from world.acme import subscription
def make_stuff_happen():
acme.account.foo() # Works
subscription.bar() # Now this works.
make_stuff_happen()
All I can say is WTF, What could be causing this?
The behavior should at least be consistent for both acme.account
and acme.subscription
.
Thanks!
Update- Folder structure of the acme folder:
acme
|-- __init__.py
|-- account.py
|-- catalog.py
|-- core.py
|-- proxy.py
|-- subscription.py
`-- utils.py
And __init__.py
is completely blank.