xml - Graticule and Rails: REXML::ParseException: missing attribute quote -


i use graticule 1.0.0.pre2. when try locate addresses google doesn't recognize, graticule raises exception:

libxml::xml::error in cms/storescontroller#update  fatal error: content @ end of document @ :1. /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/happymapper-0.3.2/lib/happymapper.rb:84:in `parse' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/happymapper-0.3.2/lib/happymapper.rb:84:in `parse' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/graticule-1.0.0.pre2/lib/graticule/geocoder/google.rb:82:in `prepare_response' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/graticule-1.0.0.pre2/lib/graticule/geocoder/base.rb:83:in `get' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/graticule-1.0.0.pre2/lib/graticule/geocoder/google.rb:36:in `locate' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/acts_as_geocodable-1.0.4/lib/acts_as_geocodable/geocode.rb:31:in `create_from_location' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/acts_as_geocodable-1.0.4/lib/acts_as_geocodable/geocode.rb:27:in `find_or_create_by_location' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/acts_as_geocodable-1.0.4/lib/acts_as_geocodable.rb:262:in `attach_geocode' ... ... 

i'm using google service. response generates exception:

"<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/><title>sorry...</title><style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style></head><body><div><table><tr><td><b><font face=times color=#0039b6 size=10>g</font><font face=times color=#c41200 size=10>o</font><font face=times color=#f3c518 size=10>o</font><font face=times color=#0039b6 size=10>g</font><font face=times color=#30a72f size=10>l</font><font face=times color=#c41200 size=10>e</font></b></td><td style=\"text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%\"><div style=\"border-bottom: 1px solid #dfdfdf;\">sorry...</div></td></tr></table></div><div style=\"margin-left: 4em;\"><h1>we're sorry...</h1><p>... computer or network may sending automated queries. protect our users, can't process request right now.</p></div><div style=\"margin-left: 4em;\">see <a href=\"http://www.google.com/support/bin/answer.py?answer=86640\">google help</a> more information.<br/><br/></div><div style=\"text-align: center; border-top: 1px solid #dfdfdf;\">&copy; 2009 google - <a href=\"http://www.google.com\">google home</a></div></body></html>" 

with other addresses works! how can prevent exception?

i received same error. using pry debugger placed binding.pry under parse declaration in happy mapper.

/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/happymapper-0.3.2/lib/happymapper.rb:84:in `parse' 

restarted pry , ran

location = geocoder.locate("61 east 9th street, holland, mi") 

the debugger stopped right after

def parse(xml, options = {}) 

i did dump of xml variable receive html dump google included message

<h1>we're sorry...</h1> <p>... computer or network may sending automated queries.  protect our users, can't process request right now.</p> see <a href="https://support.google.com/websearch/answer/86640">     google </a> more information. 

haven't resolved yet that's issue.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -