Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playlist_updates.py is broken in newer versions of python #550

Open
pmansfilmn opened this issue Aug 22, 2024 · 1 comment
Open

playlist_updates.py is broken in newer versions of python #550

pmansfilmn opened this issue Aug 22, 2024 · 1 comment

Comments

@pmansfilmn
Copy link

./playlist_updates.py
  File "/home/pmansfield/git/pmansfield/devops_utilities/google/./playlist_updates.py", line 60
    print 'New playlist ID: %s' % playlists_insert_response['id']
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

then

$ ./playlist_updates.py
  File "/home/pmansfield/git/pmansfield/devops_utilities/google/./playlist_updates.py", line 77
    except HttpError, e:
           ^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

then

$ ./playlist_updates.py
  File "/home/pmansfield/git/pmansfield/devops_utilities/google/./playlist_updates.py", line 78
    print 'An HTTP error %d occurred:\n%s' % (e.resp.status, e.content)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

then

Traceback (most recent call last):
  File "/home/pmansfield/git/pmansfield/devops_utilities/google/./playlist_updates.py", line 74, in <module>
    youtube = get_authenticated_service()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pmansfield/git/pmansfield/devops_utilities/google/./playlist_updates.py", line 40, in get_authenticated_service
    credentials = flow.run_console()
                  ^^^^^^^^^^^^^^^^
AttributeError: 'InstalledAppFlow' object has no attribute 'run_console'
@pmansfilmn
Copy link
Author

most of the google examples seem woefully out of date or totally broken. dismal effort, google, shameful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant