1

Using Python 2.6.6

Trying to install dropbox python api..

Tried both ' pip install dropbox ' and ' python setup.py install '

Got this error... on import dropbox

Traceback (most recent call last):

    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.6/site-packages/dropbox/__init__.py", line 3, in <module>
    from . import client, rest, session
    File "/usr/lib/python2.6/site-packages/dropbox/client.py", line 22, in <module>
    from .rest import ErrorResponse, RESTClient, params_to_urlencoded
    File "/usr/lib/python2.6/site-packages/dropbox/rest.py", line 415
    utf8_params = {encode(k): encode(v) for k, v in params.iteritems()}
                                      ^
SyntaxError: invalid syntax

am i doing anything wrong..?

1 Answer 1

2

It appears the code in the dropbox API uses dictionary comprehensions, which were not introduced until Python 2.7. This can also be seen on the PyPI page for this module, which lists 2.7 as the Python version needed. You will not be able to use this module unless you upgrade to Python 2.7. (According to this question it must be Python 2.7, as the API doesn't yet support Python 3.)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a ton! That's the issue.. Installed and checked with python 2.7.3 its working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.