google-code-export / gdata-python-client

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

403.4 status code with work with SpreadSheet #547

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello.
I use code below for getting table:

import gdata.spreadsheet.text_db

def _getResumeTable():
    if self.table is None:
        client = gdata.spreadsheet.text_db.DatabaseClient(username='username', password='password')
        db = client.GetDatabases(name='cv')[0]
        self.table = db.GetTables(name='Sh1')[0]

    return self.table

this code worked well until today (30 september).

Now i get such exception: 
gdata.service.RequestError: {'status': 403, 'body': '403.4 SSL required', 
'reason': 'Forbidden'}

Original issue reported on code.google.com by alexande...@fastdev.se on 30 Sep 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Sorry. it was method of class, i forget to delete 'self'. Corrected code is: 

import gdata.spreadsheet.text_db

def _getResumeTable():
        client = gdata.spreadsheet.text_db.DatabaseClient(username='username', password='password')
        db = client.GetDatabases(name='cv')[0]
        table = db.GetTables(name='Sh1')[0]

    return table

Original comment by alexande...@fastdev.se on 30 Sep 2011 at 10:43

GoogleCodeExporter commented 9 years ago
i am also using gdata api to access online spreadsheet. I am using OAuth 1.0 
and from yesterday my program is also getting same error.

client.SetOAuthInputParameters(auth.OAuthSignatureMethod.HMAC_SHA1,
                                 consumer_key='anonymous',
                                 consumer_secret='anonymous')
scopes = ['http://spreadsheets.google.com/feeds/',
              'http://docs.google.com/feeds/']
request_token = client.FetchOAuthRequestToken(
      scopes=scopes,
      extra_parameters=fetch_params)
client.SetOAuthToken(request_token)
client.GenerateOAuthAuthorizationURL()
client.UpgradeToOAuthAccessToken()

Original comment by abhishek...@google.com on 1 Oct 2011 at 8:22

GoogleCodeExporter commented 9 years ago
same here, any help?

Original comment by smla...@cvecara-online.com on 2 Oct 2011 at 12:34

GoogleCodeExporter commented 9 years ago
some porblem here using the googlecl tool on linux. any solution?

Original comment by csb.b...@gmail.com on 2 Oct 2011 at 7:14

GoogleCodeExporter commented 9 years ago
Had the same issue. 
An upgrade to the latest version of gdata-python-client solved the problem!

Original comment by kahler.a...@googlemail.com on 2 Oct 2011 at 7:24

GoogleCodeExporter commented 9 years ago
Yes. It really works now. I've download archive gdata-2.0.14.zip and it works. 
Thank you!

Original comment by alexande...@fastdev.se on 3 Oct 2011 at 8:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hey I am still getting this error.
If you can direct me to what caused this error it would be great.
Or any other way to fix this issue without upgrading it to newer version

Original comment by confes...@gmail.com on 3 Oct 2011 at 11:22

GoogleCodeExporter commented 9 years ago
Can everyone please confirm that they have upgraded to the latest version of 
the library? We are now requiring SSL in all requests.

Original comment by afs...@google.com on 7 Oct 2011 at 2:35

GoogleCodeExporter commented 9 years ago
I solved it by setting client.ssl = True before sending out any requests.

Original comment by confes...@gmail.com on 7 Oct 2011 at 5:59

GoogleCodeExporter commented 9 years ago
Great, please reopen if you have any new problems like this.

Original comment by afs...@google.com on 7 Oct 2011 at 11:04

GoogleCodeExporter commented 9 years ago
Still happens in samples/docs/docs_example.py.

Fixed by adding self.gd_client.ssl = True at line 58

Original comment by andybak on 9 Oct 2011 at 10:31

GoogleCodeExporter commented 9 years ago
Using this on my 'droid so with SL4A to test the doScience.py stuff.  

client.ssl = True did not work for me.  

So I get the latest version of gdata-client-python.zip and unpack the src to 
com.googlecode.python/extras/python/gdata.  I backed the older version up first 
by renaming it __gdata in Astro.  After you copy the gdata folder in it should 
have the same basic structure as __gdata.  

Unless anyone has ideas on how to do setup.py install on a non-rooted android 
(or just update these libs will do)?

RESOLVED

Original comment by holler...@gmail.com on 4 Nov 2011 at 3:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
gd_client.ssl = True worked for me.

Thanks!

Original comment by barbosle...@gmail.com on 18 Nov 2011 at 6:53

GoogleCodeExporter commented 9 years ago
playing around with gdata-2.0.17 ,client.ssl = True, works for me 

Original comment by Jaime.Fu...@gmail.com on 3 Jul 2013 at 4:40