Eric,

I am getting a list of documents using the following code:

        $docs = new Zend_Gdata_Docs($client);
        $docsQuery = new Zend_Gdata_Docs_Query();
        $docsQuery->setMaxResults(20);
        $feed = $docs->getDocumentListFeed($docsQuery);

There are a few documents <%1 in the list that are no longer in the
account.  When I log in to Google docs they are not present, but they
show up in the feed.  These documents were shared to the account in
the past but are no longer in the account either because they are no
longer shared or because they were deleted by the account.  They are
also not in the trashed documents.

Next, I pull out the key from the feed above then get the worksheets
for each spreadsheet using the following:

        $spreadsheet = new Zend_Gdata_Spreadsheets($client);
        $query = new Zend_Gdata_Spreadsheets_DocumentQuery();
        $query->setSpreadsheetKey($key);
        $feed = $spreadsheet->getWorksheetFeed($query);

This works great until I get to a spreadsheet that isn't in the
account and receive the following error:

<b>Fatal error</b>:  Uncaught exception 'Zend_Gdata_App_HttpException'
with message 'Expected response code 200, got 404
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Not Found&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY BGCOLOR=&quot;#FFFFFF&quot; TEXT=&quot;#000000&quot;&gt;
&lt;H1&gt;Not Found&lt;/H1&gt;
&lt;H2&gt;Error 404&lt;/H2&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
' in /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/
Zend/Gdata/App.php:501
Stack trace:
#0 /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/
Zend/Gdata.php(201): Zend_Gdata_App-&gt;performHttpRequest('GET',
'http://spreadsh...', Array, NULL, NULL, NULL)
#1 /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/
Zend/Gdata/App.php(610): Zend_Gdata-&gt;performHttpRequest('GET',
'http://spreadsh...')
#2 /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/
Zend/Gdata/App.php(541): Zend_Gdata_App-&gt;get('http://spreadsh...')
#3 /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/
Zend/Gdata/App.php(147): Zend_Gdata_App-&gt;importUrl('http://
spreadsh...', 'Zend_Gdata_Spre...')
#4 /home/content/g/w/h/gwhizmobile/html/ZendFram in <b>/home/content/g/
w/h/gwhizmobile/html/ZendFramework-1.6.1/library/Zend/Gdata/App.php</
b> on line <b>501</b><br />

I have tried getting the initial list of spreadsheets using:

        $spreadsheets = new Zend_Gdata_Spreadsheets($client);
        $query = new Zend_Gdata_Spreadsheets_DocumentQuery();
        $query->setMaxResults(20);
        $feed = $spreadsheets->getSpreadsheetFeed($query);

When this works, it actually provides the correct list of
spreadsheets, but unfortunately it only works on accounts with a small
number of spreadsheets.  If I try with an account that has greater
than 3000 shared spreadsheets, I get the following error:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Unable to read response, or response is empty' in /home/
content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/Zend/Gdata/
App.php:483 Stack trace: #0 /home/content/g/w/h/gwhizmobile/html/
ZendFramework-1.6.1/library/Zend/Gdata.php(201): Zend_Gdata_App-
>performHttpRequest('GET', 'http://spreadsh...', Array, NULL, NULL,
NULL) #1 /home/content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/
library/Zend/Gdata/App.php(610): Zend_Gdata->performHttpRequest('GET',
'http://spreadsh...') #2 /home/content/g/w/h/gwhizmobile/html/
ZendFramework-1.6.1/library/Zend/Gdata/App.php(541): Zend_Gdata_App-
>get('http://spreadsh...') #3 /home/content/g/w/h/gwhizmobile/html/
ZendFramework-1.6.1/library/Zend/Gdata/App.php(147): Zend_Gdata_App-
>importUrl('http://spreadsh...', 'Zend_Gdata_Spre...') #4 /home/
content/g/w/h/gwhizmobile/html/ZendFramework-1.6.1/library/Zend/
Gdata.php(148): Zend_Gdata_App->getFeed('http://spreadsh...',
'Zend_Gdata_Spre...') #5 /home/content/g/w/h/ in /home/content/g/w/h/
gwhizmobile/html/ZendFramework-1.6.1/library/Zend/Gdata/App.php on
line 483

Thank you for your help,
kevin


On Jul 17, 1:20 pm, "Eric (Google)" <api.e...@google.com> wrote:
> Hi Kevin,
>
> Can you provide more information such as a http
> packet capture or code snippet?
>
> Were these documents ever part of your account?
> Are you including 'trashed' documents in your query?
>
> Fetching the worksheets feed is a 
> bug:http://code.google.com/p/gdata-issues/issues/detail?id=1328
>
> ...although others are getting a 500 for that.
> Can you provide a request/response http capture?
>
> Eric
>
> On Jul 17, 6:48 am, kevin <kevin.revi...@gmail.com> wrote:
>
> > I am using the PHP ZendFramework -- getDocumentListFeed to retrieve a
> > list of spreadsheets
>
> > In the list of results (for two different accounts where there are
> > many shared spreadsheets (e.g., 3000+) that are not owned by the
> > account), there are a couple of previously shared spreadsheets that
> > show up in the feed that are no longer in the account.  If I try to
> > get the worksheet feed for each spreadsheet, I receive a file not
> > found error.
>
> > Why does the list contain content that isn't there?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to