kulpa / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

samples/buzz not working #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
After the installation process is complete:
The error is found in samples/buzz.
1. cd samples/buzz
2. python three three_legged_dance.py
3. python buzz.py

on step 3, I will receive the following output:

What is the expected output? What do you see instead?
Retrieved the first two activities
Traceback (most recent call last):
  File "buzz.py", line 66, in <module>
    main()
  File "buzz.py", line 39, in main
    activitylist = activities.list_next(activitylist).execute()
AttributeError: 'NoneType' object has no attribute 'execute'
eugene@eugene:~/Desktop/google-api-python-client/samples/buzz$ python buzz.py
Retrieved the first two activities
Traceback (most recent call last):
  File "buzz.py", line 66, in <module>
    main()
  File "buzz.py", line 39, in main
    activitylist = activities.list_next(activitylist).execute()

What version of the product are you using? On what operating system?
Version 0.1 on ubuntu 10.04

Please provide any additional information below.

Original issue reported on code.google.com by ye.eug...@gmail.com on 30 Oct 2010 at 8:58

GoogleCodeExporter commented 9 years ago
I tried commenting line 39, and ran the sample. it works. Is commenting line 39 
the right way to debug the code?

Original comment by ye.eug...@gmail.com on 30 Oct 2010 at 9:01

GoogleCodeExporter commented 9 years ago
list_next() will return None if there are no more pages of results. I will make 
the code more robust to that possibility.

Original comment by jcgregorio@google.com on 30 Oct 2010 at 2:26

GoogleCodeExporter commented 9 years ago
I have checked in a fix to the sample that checks for None before calling 
list_next().

Original comment by jcgregorio@google.com on 8 Nov 2010 at 2:48