Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
another ValueError: Didn't find exactly one placemark! (Found 0.)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dbusarow  
View profile  
 More options Mar 3 2008, 7:58 pm
From: dbusarow <dbusa...@gmail.com>
Date: Mon, 3 Mar 2008 16:58:45 -0800 (PST)
Local: Mon, Mar 3 2008 7:58 pm
Subject: another ValueError: Didn't find exactly one placemark! (Found 0.)
Hi, I'm also getting the error message

  ValueError: Didn't find exactly one placemark! (Found 0.)

like a previous post but in my case it does not seem to be a bad
address format causing the problem.

Here's what I have

from geopy import geocoders
g = geocoders.Google('My API Key')
# I've tried this with the non-API key version too, no difference
place, (lat, lng) = g.geocode('1091 chamberlain drive, gravenhurst p1p
1a2, canada')
Traceback (most recent call last):
...
ValueError: Didn't find exactly one placemark! (Found 0.)

Entering the same address at Google does work although it changes
"drive" to "dr".  Making the same change in the geocoder call does not
help.

Any ideas??

Thanks,
Dan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hajo Smulders  
View profile  
 More options Mar 3 2008, 9:00 pm
From: "Hajo Smulders" <hajosmuld...@gmail.com>
Date: Mon, 3 Mar 2008 21:00:03 -0500
Local: Mon, Mar 3 2008 9:00 pm
Subject: Re: another ValueError: Didn't find exactly one placemark! (Found 0.)

This is a google error.
Pass along the parameter: exactly_one=False
as in:
place, (lat, lng) = g.geocode('1091 chamberlain drive, gravenhurst p1p
1a2, canada', exactly_one=False)

Hajo

(This is the example from the documentation:
See: http://exogen.case.edu/projects/geopy/

   1. >>> for place, (lat, lng) in g.geocode(
   '1296 Magnolia Dr in Cleveland',
   2. ...                                    exactly_one=False):
   3. ...     print "%s: %.5f, %.5f" % (place, lat, lng)
   4. 1670 Magnolia Dr, Cleveland, OH 44106, USA: 41.51211, -81.60704
   5. 199 Magnolia Dr, Cleveland, OH 44110, USA: 41.58104, -81.56251

--
--------------------------------------------------------------------------- -----------------------
There is a tragic flaw in our precious Constitution, and I don't know what
can be done to fix it. This is it: Only nut cases want to be president.
 - Kurt Vonnegut

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dbusarow  
View profile  
 More options Mar 4 2008, 12:39 pm
From: dbusarow <dbusa...@gmail.com>
Date: Tue, 4 Mar 2008 09:39:25 -0800 (PST)
Local: Tues, Mar 4 2008 12:39 pm
Subject: Re: another ValueError: Didn't find exactly one placemark! (Found 0.)

On Mar 3, 7:00 pm, "Hajo Smulders" <hajosmuld...@gmail.com> wrote:

> This is a google error.
> Pass along the parameter: exactly_one=False
> as in:
> place, (lat, lng) = g.geocode('1091 chamberlain drive, gravenhurst p1p
> 1a2, canada', exactly_one=False)

> Hajo

Hajo,

You are correct of course.   I mis-stated my problem.  It's not the
ValueError being raised that I was trying to fix, it's the fact that
using the address shown I get back 0 results.

If I go to Google and enter the same address manually it works fine.

I'm looking for suggestions on what I can do to coax a lat/lon out of
Google/geopy for that address.

Thanks!

Dan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hajo Smulders  
View profile  
 More options Mar 4 2008, 2:03 pm
From: "Hajo Smulders" <hajosmuld...@gmail.com>
Date: Tue, 4 Mar 2008 14:03:20 -0500
Local: Tues, Mar 4 2008 2:03 pm
Subject: Re: another ValueError: Didn't find exactly one placemark! (Found 0.)

Have you tried to "scrape" google method (ie: the one where you don't use a
google key; but it scrapes the google mapping page? The google mapping page
is more up to date that the data you access by key. Sometimes significantly
so. I work for a pretty big company and although we all have API keys we use
the scrape method a lot.

Hajo

--
--------------------------------------------------------------------------- -----------------------
There is a tragic flaw in our precious Constitution, and I don't know what
can be done to fix it. This is it: Only nut cases want to be president.
 - Kurt Vonnegut

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dbusarow  
View profile  
 More options Mar 5 2008, 12:51 pm
From: dbusarow <dbusa...@gmail.com>
Date: Wed, 5 Mar 2008 09:51:45 -0800 (PST)
Local: Wed, Mar 5 2008 12:51 pm
Subject: Re: another ValueError: Didn't find exactly one placemark! (Found 0.)

On Mar 4, 12:03 pm, "Hajo Smulders" <hajosmuld...@gmail.com> wrote:

> Have you tried to "scrape" google method (ie: the one where you don't use a
> google key; but it scrapes the google mapping page? The google mapping page
> is more up to date that the data you access by key. Sometimes significantly
> so. I work for a pretty big company and although we all have API keys we use
> the scrape method a lot.

OK, I guess I'll give that a try.

Thanks for your help.

Dan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google