Temat: [python] google drive problem z step2_exchange

Próbuję do tego wykorzystać skrypt https://github.com/kshcherban/gdrive_uploader
Udało mi się przejść pierwszy krok autoryzacji oauth2, generuje mi linka którego potwierdzam kodem.

Problem występuje w tym miejscu "credentials = flow.step2_exchange(code)"

    flow = OAuth2WebServerFlow(
        CLIENT_ID,
        CLIENT_SECRET,
        OAUTH_SCOPE,
        redirect_uri=REDIRECT_URI
        )
    authorize_url = flow.step1_get_authorize_url()
    print('Go to the following link in your browser: ' + authorize_url)
    code = raw_input('Enter verification code: ').strip()
    credentials = flow.step2_exchange(code)
    storage = Storage(token_file)
    storage.put(credentials)
    return storage

Wtedy dostaję błąd:

Traceback (most recent call last):
  File "gdrive_upload.py", line 118, in <module>
    http = authorize(token_file, create_token_file(token_file))
  File "gdrive_upload.py", line 54, in create_token_file
    credentials = flow.step2_exchange(code)
  File "/usr/lib/python2.7/site-packages/oauth2client-4.0.0-py2.7.egg/oauth2client/_helpers.py", line 133, in positional_wrapper
  File "/usr/lib/python2.7/site-packages/oauth2client-4.0.0-py2.7.egg/oauth2client/client.py", line 2054, in step2_exchange
  File "/usr/lib/python2.7/site-packages/oauth2client-4.0.0-py2.7.egg/oauth2client/transport.py", line 282, in request
  File "/usr/lib/python2.7/site-packages/httplib2-0.10.3-py2.7.egg/httplib2/__init__.py", line 1659, in request
  File "/usr/lib/python2.7/site-packages/httplib2-0.10.3-py2.7.egg/httplib2/__init__.py", line 1399, in _request
  File "/usr/lib/python2.7/site-packages/httplib2-0.10.3-py2.7.egg/httplib2/__init__.py", line 1319, in _conn_request
  File "/usr/lib/python2.7/site-packages/httplib2-0.10.3-py2.7.egg/httplib2/__init__.py", line 1069, in connect
  File "/usr/lib/python2.7/site-packages/httplib2-0.10.3-py2.7.egg/httplib2/__init__.py", line 96, in _ssl_wrap_socket
IOError: [Errno 20] Not a directory

Gdzie może być problem?