koalalorenzo/python-digitalocean

'module' object has no attribute 'Manager'

Closed this issue · 8 comments

Hi,

I have just installed this via pip and I get - 'module' object has no attribute 'Manager' when I run the following...

import digitalocean
manager = digitalocean.Manager(token="MySecretTokenxxxxxxxxxxxxxxxxxxxxxxxxx")
my_droplets = manager.get_all_droplets()
print(my_droplets)

Any help is much appreciated.

Thanks

Matthew

Are you using the right module? Have you installed python-digitalocean correctly?
Is this issue still affecting you? (I think it is not a project issue)

Do you by any chance have a file called digitalocean.py in your current directory?

Can you check if the python path?
I may suggest to try it in a VM/Virtualenv/Container

That should be fine, but I was wondering if you named one of your own files the same as one from python-digitalocean. Could you provide the complete error message?
For example, when I have a file named "digitalocean.py" in my current directory:

Traceback (most recent call last):
  File "digitalocean.py", line 1, in <module>  
    import digitalocean  
  File "/home/billie/digitalocean.py", line 4, in <module>  
    manager = digitalocean.Manager(token=token)  
AttributeError: module 'digitalocean' has no attribute 'Manager'  

I can immediately see which digitalocean-file it is trying to import.

Check the requirements to use SSL with python requests: #109. You may need to install some packages 👍