0
import httplib
try:
    import json
except ImportError:
    import simplejson as json

path = ('/maps/geo?q=207+N.+Defiance+St%2C+Archbold%2C+OH''&output=json&oe=utf8')

connection = httplib.HTTPConnection('maps.google.com')
connection.request('GET', path)

rawreply = connection.getresponse().read()
reply = json.loads(rawreply)
print(reply)

on executing it i'm not getting a desired output instead of it i'm getting:

{u'Status': {u'code': 610, u'request': u'geocode'}}

If anyone knows the solution kindly help me.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Jaassi
  • 57
  • 5

1 Answers1

1

You need to move from version 2 to version 3 of the API. The old API which you are using was retired in March. See this page on how to upgrade.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
  • Actually i am just new to networking in python and following "Foundations of Python Network Programming" book.But almost every example of this book is not working (may be every example is based on version 2 of google API).Do you know any good book or documentation from which i can learn network programming in python.... – Jaassi Jul 29 '13 at 20:45
  • What exactly do you want to learn? Network programming is very broad. – Burhan Khalid Jul 29 '13 at 20:57
  • I want to learn "Twisted Python".But its documentation is not so understandable.In the website of TwistedPython,they have given the link of this book(i.e. "Foundations of Python Network Programming" ).that's why i am reading this book.My main motto is to learn twisted python only. – Jaassi Jul 29 '13 at 21:07
  • Why not start with the [twisted book](http://www.amazon.com/Twisted-Network-Programming-Essentials-ebook/dp/B00BT0IEJE/ref=sr_1_1?ie=UTF8&qid=1375132154&sr=8-1&keywords=twisted+network+programming+essentials)? – Burhan Khalid Jul 29 '13 at 21:10
  • But sir this Twisted book does'nt cover any networking basics..and without proper basics jumping on advance thing is not a good practice...that's why i am not reading this book. kindly give me some guidence from where to start for learning twisted python properly. – Jaassi Jul 29 '13 at 21:17