GithubHelp home page GithubHelp logo

mkjmkumar / google-api-python-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 5.43 MB

Automatically exported from code.google.com/p/google-api-python-client

License: Other

Makefile 0.60% Python 99.33% Shell 0.07%

google-api-python-client's People

Contributors

aiuto avatar aliafshar avatar craigcitro avatar dhermes avatar jcgregorio avatar josealcerreca avatar leadpipe avatar mco-gh avatar proppy avatar tommiller avatar

Watchers

 avatar

google-api-python-client's Issues

With JSON error payloads, HttpError returns a non-string in __str__

What steps will reproduce the problem?
1. Receiving a JSON error response from a service in JsonModel.response, the 
'detail' attribute passed into HttpError is the result of loading the 'error' 
value in the JSON object, which is also an object/dict and so can't be returned 
from __str__.

I get '<unprintable HttpError>' in tracebacks, which is unhelpful for debugging.

I am not sure what the best way to fix this is, but one possibility is to just 
pass the status and reason into the HttpError in the same way that it is 
handled for non application/json errors. I can prepare a fix/patch to do it 
like this unless someone else has overriding thoughts?

Original issue reported on code.google.com by [email protected] on 15 Dec 2010 at 2:56

Error when using APi with google translate

What steps will reproduce the problem?
1.launch the file main.py in sample/translate/
2.
3.

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

Normaly the word flower have to be translated.

But I have this error : 

Traceback (most recent call last):
  File "samples/translate/main.py", line 33, in <module>
    main()
  File "samples/translate/main.py", line 29, in main
    q="flower"
  File "/usr/local/lib/python2.6/dist-packages/google_api_python_client-0.1-py2.6.egg/apiclient/discovery.py", line 179, in method
    raise TypeError('Got an unexpected keyword argument "%s"' % name)
TypeError: Got an unexpected keyword argument "q"


What version of the product are you using? On what operating system?
ubuntu 10.10
python 2.6

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 15 Dec 2010 at 3:34

Move enable-app-engine-project into setup.py

The enable-app-engine-project script should be moved into an option in setup.py 
so it can be run as:

  $ python setup.py copy_to_app_engine <project dir>

This will make sure that the right files are picked up and avoid all the issues 
of trying to unpack eggs, etc.

Original issue reported on code.google.com by [email protected] on 6 Jul 2011 at 1:27

appengine helpers should provide @oauth_required decorator

What steps will reproduce the problem?
1. Begin to write an appengine sample
2. Add calls to a Google API
3. Now the oauth dance takes 80% of your SLOC

What is the expected output? What do you see instead?
Adding oauth should be as simple as wrapping your handler method with 
@oauth_required, like Buzz simple_wrapper in contrib.

What version of the product are you using? On what operating system?
google-api-python-client tip

Original issue reported on code.google.com by [email protected] on 17 May 2011 at 2:03

Support ClientLogin

References:

http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
http://code.google.com/apis/bigquery/docs/overview.html

BigQuery API requires ClientLogin, but most likely eventually they will support 
OAuth 2.  So hopefully we will be able to avoid ever implementing this.

Original issue reported on code.google.com by [email protected] on 24 May 2011 at 5:22

Error on importing simplejson

What steps will reproduce the problem?

Expected to import without error

{{{
>>> from apiclient.discovery import build
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "./apiclient/discovery.py", line 37, in <module>
    from json import simplejson
ImportError: cannot import name simplejson
}}}

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

Hg tip, Python2.6 Lucid

Patch in https://afshar-bugfix.googlecode.com/hg/

Original issue reported on code.google.com by [email protected] on 15 Dec 2010 at 9:23

Storage's need a delete() method

All Storages, in particular StorageByKeyName, need a delete() method that 
allows removing the credentials (and maybe rescinds the grant?).

Original issue reported on code.google.com by [email protected] on 18 Jul 2011 at 2:48

oauth1 uses OptionParser which conflicts with gflags

http://code.google.com/p/google-api-python-client/source/browse/apiclient/ext/au
thtools.py uses OptionParser (optparse is deprecated as well). Most of the new 
api libraries use gflags. When oauth1 is invoked from the program which uses 
gflags, optionaprser tries to parse the gflags and fails.  

This could be fixed by using gflags in oauth1 authtools.

Original issue reported on code.google.com by [email protected] on 27 May 2011 at 4:42

db_type() got an unexpected keyword argument 'connection'

What steps will reproduce the problem?
1. install last Django
2. run django_sample/manage.py syncdb

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

TypeError: db_type() got an unexpected keyword argument 'connection'

Simple stupid fix:

diff -r 1ebf6bc50970 oauth2client/django_orm.py
--- a/oauth2client/django_orm.py    Mon Apr 11 11:33:42 2011 -0400
+++ b/oauth2client/django_orm.py    Fri Apr 15 01:03:05 2011 +0400
@@ -31,7 +31,7 @@

   __metaclass__ = models.SubfieldBase

-  def db_type(self):
+  def db_type(self, connection=None):
     return 'VARCHAR'

   def to_python(self, value):
@@ -49,7 +49,7 @@

   __metaclass__ = models.SubfieldBase

-  def db_type(self):
+  def db_type(self, connection=None):
     return 'VARCHAR'

   def to_python(self, value):


Original issue reported on code.google.com by [email protected] on 14 Apr 2011 at 9:05

Add keyring support to Storage

Storage objects that store locally should support keyring, if not all samples 
then have at least one sample specifically that uses keyring.

Original issue reported on code.google.com by [email protected] on 2 May 2011 at 3:23

Facebook Responds with String, Not JSON

File: google-api-python-client/oauth2client/client.py

To make OAuth2WebServerFlow(Flow) work with Facebook, in step2_exchange(), 
change:

# TODO(jcgregorio) Raise an error if simplejson.loads fails?
d = simplejson.loads(content)

...to...

# TODO(jcgregorio) Raise an error if simplejson.loads fails?
try:
    d = simplejson.loads(content)
except:
    d = response_decoder(content)


...and add this response_decoder() function:

def response_decoder(body):
    params = {}
    for k, v in urlparse.parse_qs(body).iteritems():
        if len(v) > 1:
            params[k] = v
        else:
            params[k] = v[0]
    return params



Original issue reported on code.google.com by james.thornton on 12 Jun 2011 at 1:15

Add a tool to enable the library on an App Engine project

App Engine applications needs to have the source for libraries, or at least 
soft-links to the library, in the local project directory. Create a command 
line application that can easily add the soft links (or source for platforms 
that don't support soft links) to an existing App Engine project.

Original issue reported on code.google.com by [email protected] on 30 Mar 2011 at 4:49

gtaskqueue, gtaskqueue_puller not included in download archive

[Use this form for both apiclient and oauth2client issues]

What steps will reproduce the problem?
0. download, unzip google-api-python-client-1.0beta2.zip
1. run setup.py install for main python-api-client
2. run setup.py install for samples/gtaskqueue_sample
3. setup will complain that gtaskqueue and gtaskqueue_puller not available

What is the expected output? What do you see instead?
setup.py install fails. cannot run gtaskqueue utility as demonstrated in task 
queue examples

What version of the product are you using? On what operating system?
google-api-python-client-1.0, under Ubuntu Lucid

Please provide any additional information below.
1. It appears that gtaskqueue files are included when checking out via Hg but 
not in zip archive.

Original issue reported on code.google.com by [email protected] on 13 Jul 2011 at 8:12

Method names can't be reserved words

The global() collection on Moderator is uncallable w/o resorting to tricks. All 
method names should be checked and modified to avoid clashing with reserved 
words.

Original issue reported on code.google.com by [email protected] on 7 Jul 2011 at 3:19

samples/buzz not working

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 [email protected] on 30 Oct 2010 at 8:58

API key contained in example code

Some of the examples contain an API key, for example customsearch and 
diacritize. I haven't tried to see if it's valid, but I would guess you'd want 
to put a placeholder "INSERT-YOUR-KEY" there instead and generate a new key.

Original issue reported on code.google.com by [email protected] on 4 Mar 2011 at 6:00

1.0 beta 2

Version: 1.0 beta 2

Expected freeze date: 8 May 2011

Expected release date:  8 May 2011

Original issue reported on code.google.com by [email protected] on 9 May 2011 at 6:31

better comments for app engine sample

There is no readme.txt for the fields that need to change to get the sample 
running.  
The application id if obvious for app engine developers.
I could guess about api and secret although a pointer would be nice

The return url was not as obvious.  An easier way would be to change the return 
url to the default return url.

Original issue reported on code.google.com by alvinwang on 9 May 2011 at 9:43

OAuth flow broken on appengine sample

The App Engine sample constructs the OAuth callback URL using the form 
"{application-id}.appspot.com".  This of course does not work when running on 
localhost.  Instead, the callback URL should be constructed using 
self.request.relative_url('/auth_return') so that it works for all environments.

Patch attached.

Original issue reported on code.google.com by [email protected] on 9 Jan 2011 at 11:38

Attachments:

enable-app-engine-project script has egg issues

What steps will reproduce the problem?
1. Try using enable-app-engine-project on a machine where gflags was installed 
by setuptools.

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

 "py2.6.egg/gflags.py': doesn't exist or not a regular file"

Script should unpack needed files and directories from eggs.

Original issue reported on code.google.com by [email protected] on 27 Apr 2011 at 9:17

oauth parameters is not passed properly

I use google-api-python-client in my application to access google latitude data.
First, I must get the authorization token, I do this by the following lines:

flow = FlowThreeLegged(latitude_discovery,
                       consumer_key='my_key',
                       consumer_secret='my_secret',
                       user_agent='my_user_agent',
                       domain='my_domain',
                       scope='https://www.googleapis.com/auth/latitude',
                       xoauth_displayname='Google API Client Example App',
                       location='all',
                       granularity='best'
                    )

I pass two parameters location and granularity to the FlowThreeLegged class, 
and it must send to the oauth url, but not.

I think the problem happens in oauth.py line 56-60:

  keys = discovery[name]['parameters'].keys()
  query = {}
  for key in keys:
    if key in params:
      query[key] = params[key]

keys did not contain location or granularity, neither the url.

It seems that the file "/contrib/latitude/future.json" is out-of-date.

Original issue reported on code.google.com by [email protected] on 18 Oct 2010 at 8:24

http://code.google.com/p/google-api-python-client/issues/entry

http://code.google.com/p/google-api-python-client/source/browse/apiclient/ext/au
thtools.py uses OptionParser (optparse is deprecated as well). Most of the new 
api libraries use gflags. When oauth1 is invoked from the program which uses 
gflags, optionaprser tries to parse the gflags and fails.  

This could be fixed by using gflags in oauth1 authtools.

Original issue reported on code.google.com by [email protected] on 27 May 2011 at 4:42

django_sample not working : from apiclient.ext.django import FlowThreeLeggedField ImportError: No module named ext.django

What steps will reproduce the problem?

1. python manage syncdb command at the project.


What is the expected output? What do you see instead?
I am suppose to have the tables built. But i received the following instead 
after running python manage syncdb :

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 146, in get_app_errors
    self._populate()
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 78, in load_app
    models = import_module('.models', app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/eugene/public_html/django/tabshift/../tabshift/buzz/models.py", line 8, in <module>
    from apiclient.ext.django import FlowThreeLeggedField
ImportError: No module named ext.django



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.
i installed the client using sudo python setup.py install.
I checked the .egg file and noticed that there is no /ext folder in apiclient. 

there might be an error in installation process.

Original issue reported on code.google.com by [email protected] on 30 Oct 2010 at 12:07

Client doesn't validate certificates

The httplib2 library that google-api-python-client relies upon does not do 
certificate validation. For potential solutions see:


  fancy_urllib and http://selenic.com/hg/file/tip/mercurial/url.py#l509


Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 3:00

Better error handling for unknown service name or version

When you call discovery.build() with the name of a service or version that does 
not exist, you ought to get an explicit exception for this case.  Instead, you 
get an exception that comes naturally from a failure elsewhere in the library.  
(It's a KeyError, which isn't entirely wrong, but it's not a very helpful 
KeyError.)

Original issue reported on code.google.com by [email protected] on 2 May 2011 at 3:41

Responses are not unescaped

Responses that contain special characters like ' are not unescaped when 
returned back.

For example:

Doctor&#39;s stethoscope

instead of

Doctor's stethoscope

coming from the translation API.

Original issue reported on code.google.com by [email protected] on 4 Mar 2011 at 6:05

StorageByKeyName().get() has side effects

If you create a StorageByKeyName() and call get() on it, it will actually 
perform a get_or_insert(). This seems unintuitive, since I wouldn't expect 
calling a function called get() would (if it doesn't find the desired key) 
actually insert a record...

What steps will reproduce the problem?
1. SomeModel.get_by_key_name('NonexistentKey')
2. StorageByKeyName(SomeModel,'NonexistentKey').get()
3. SomeModel.get_by_key_name('NonexistentKey') now exists!

Perhaps I'm thinking about StorageByKeyName wrong?

Original issue reported on code.google.com by [email protected] on 24 Jul 2011 at 9:17

It should be possible to set a timeout when using the client library on AppEngine

What steps will reproduce the problem?
1. Perform an HTTP call using the client library against a resource that takes 
longer than the standard App Engine timeout limit (5 seconds)
2. See DownloadError: ApplicationError: 5

What is the expected output? What do you see instead?
You should be able to set a timeout value for the client library and that 
should get propagated down to AppEngine's urlfetch so that a call which times 
out at a point that's greater than 5 seconds but less than the new timeout 
value will succeed

Please use labels and text to provide additional information.
appengine http

Original issue reported on code.google.com by [email protected] on 9 Feb 2011 at 10:30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.