FlorianHeigl / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

google youtube list without a linked youtube account fails with stack trace. #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. google youtube list
2. authenticate

What is the expected output? What do you see instead?

macbook:bin ashley$ google youtube list
Traceback (most recent call last):
  File "/usr/local/bin/google", line 448, in <module>
    main()
  File "/usr/local/bin/google", line 442, in main
    run_once(options, args)
  File "/usr/local/bin/google", line 307, in run_once
    token_valid = client.IsTokenValid()
  File "/Library/Python/2.6/site-packages/googlecl/youtube/service.py", line 98, in is_token_valid
    return googlecl.service.BaseServiceCL.IsTokenValid(self, test_uri)
  File "/Library/Python/2.6/site-packages/googlecl/service.py", line 170, in is_token_valid
    self.Get(test_uri)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1108, in Get
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 401, 'body': 
'<HTML>\n<HEAD>\n<TITLE>NoLinkedYouTubeAccount</TITLE>\n</HEAD>\n<BODY 
BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>NoLinkedYouTubeAccount</H1>\n<H2>Error 
401</H2>\n</BODY>\n</HTML>\n', 'reason': 'NoLinkedYouTubeAccount'}

What version of the product are you using? On what operating system?

google 0.9.5 / Snow Leopard

Please provide any additional information below.
I don't have a YouTube account.

Original issue reported on code.google.com by apittman@gmail.com on 18 Jun 2010 at 9:59

GoogleCodeExporter commented 9 years ago
For what it's worth I don't have a picasa account either.

macbook:bin ashley$ google picasa list
Please specify user: apittman
(Hint: You can automatically launch your browser by adding "auth_browser = 
<browser>" to your config file under the GENERAL section, or define the BROWSER 
environment variable.)
Please log in and/or grant access via your browser at 
https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2F8JNANKL639nj
XOXl25_0_4JIZV-5 then hit enter.
/Library/Python/2.6/site-packages/gdata/photos/service.py:110: 
DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  self.message = "(%(status)s) %(body)s -- %(reason)s" % response
Traceback (most recent call last):
  File "/usr/local/bin/google", line 448, in <module>
    main()
  File "/usr/local/bin/google", line 442, in main
    run_once(options, args)
  File "/usr/local/bin/google", line 337, in run_once
    task.run(client, options, args)
  File "/Library/Python/2.6/site-packages/googlecl/picasa/service.py", line 313, in _run_list
    force_photos=True)
  File "/Library/Python/2.6/site-packages/googlecl/picasa/service.py", line 78, in build_entry_list
    album_entry = self.GetAlbum(user=user, title=title)
  File "/Library/Python/2.6/site-packages/googlecl/picasa/service.py", line 183, in get_album
    return self.GetEntries(uri, title)
  File "/Library/Python/2.6/site-packages/googlecl/service.py", line 112, in get_entries
    feed = self.GetFeed(uri)
  File "/Library/Python/2.6/site-packages/gdata/photos/service.py", line 179, in GetFeed
    raise GooglePhotosException(e.args[0])
gdata.photos.service.GooglePhotosException: (404, 'Not Found', 'Unknown user.')

Original comment by apittman@gmail.com on 18 Jun 2010 at 10:46

GoogleCodeExporter commented 9 years ago
Wait, so if you don't have a Youtube account what do you expect to see?

Original comment by mjbauer95 on 21 Jun 2010 at 4:00

GoogleCodeExporter commented 9 years ago
What I don't expect to see is a stack trace.

Original comment by apittman@gmail.com on 21 Jun 2010 at 4:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Attached patch should fix this issue.

Original comment by bart...@gmail.com on 21 Jun 2010 at 7:29

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r284.

Original comment by tom.h.mi...@gmail.com on 22 Jun 2010 at 8:08

GoogleCodeExporter commented 9 years ago
bartosh's patch will indeed fix the problem for people without a linked youtube 
account. r284 is a more general solution (and contains some related fixes)

Original comment by tom.h.mi...@gmail.com on 22 Jun 2010 at 8:09

GoogleCodeExporter commented 9 years ago
Re-opened because of issue with is_token_valid not catching the NoLinked... 
error

Original comment by tom.h.mi...@gmail.com on 28 Jun 2010 at 4:20

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r304.

Original comment by tom.h.mi...@gmail.com on 28 Jun 2010 at 4:28