I'm starting with the python api dropbox ,I've copied the first example but I get an error
import dropbox
# Get your app key and secret from the Dropbox developer website
app_key = 'MY_APP_KEY'
app_secret = 'MY_APP_SECRET'
flow = dropbox.client.DropboxOAuth2FlowNoRedirect(app_key, app_secret)
the dropbox object has not a client atribute but it's the same code of the documentation.
the traceback
/usr/bin/python2.7 /home/user/PycharmProjects/api/dropbox.py
Traceback (most recent call last):
File "/home/user/PycharmProjects/api/dropbox.py", line 3, in <module>
import dropbox
File "/home/user/PycharmProjects/api/dropbox.py", line 9, in <module>
flow = dropbox.client.DropboxOAuth2FlowNoRedirect(app_key, app_secret)
AttributeError: 'module' object has no attribute 'client'
You have called your own script dropbox.py
, you need to rename your script and delete any dropbox.pyc
file. You are trying to import from your local file not the dropbox
module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With