Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

UnboundLocalError: local variable 'success' referenced before assignment #307

Closed
oskar-j opened this issue Sep 16, 2015 · 2 comments
Closed

Comments

@oskar-j
Copy link

oskar-j commented Sep 16, 2015

Hi, I'm trying to run the example program from https://developers.google.com/youtube/v3/docs/comments/list#examples which downloads comments from youtube. My goal is to download all comments from a particular video on Youtube. I configured the client_secrets.json file, but when I run python dataset2.py --noauth_local_webserver --videoid=pOrW6swvun0 I get an error

Traceback (most recent call last):
  File "dataset2.py", line 178, in <module>
    youtube = get_authenticated_service(args)
  File "dataset2.py", line 61, in get_authenticated_service
    credentials = run_flow(flow, storage, args)
  File "C:\Python27\lib\site-packages\oauth2client\util.py", line 142, in positi
onal_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Python27\lib\site-packages\oauth2client\tools.py", line 180, in run_f
low
    if not success:
UnboundLocalError: local variable 'success' referenced before assignment

My code is on Gist: https://gist.github.com/oskar-j/861ccdd9253c879aca31 Thanks for any help, this is my first time with the Youtube API.

@dhermes
Copy link
Contributor

dhermes commented Sep 16, 2015

Thanks for filing! #301 fixed this and #304 will push a new release out to address it.

@dhermes
Copy link
Contributor

dhermes commented Sep 16, 2015

FYI @nathanielmanistaatgoogle we really need to get #304 out

@dhermes dhermes closed this as completed Sep 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants