[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traceback using client id and crypto secret #217

Closed
guerreroda opened this issue Jan 17, 2018 · 1 comment
Closed

Traceback using client id and crypto secret #217

guerreroda opened this issue Jan 17, 2018 · 1 comment

Comments

@guerreroda
Copy link
guerreroda commented Jan 17, 2018

Hi!
This worked OK with the API Key (but it quickly got a Rate Limit), however the client ID and crypto secret produces this Traceback. Is it possible that the client is not working under my previous license type.

import googlemaps
gmaps = googlemaps.Client(client_id=client, client_secret=crypto)
directions_result = gmaps.directions(from_1,
                                         to_1,
                                         mode="transit",
                                         arrival_time=datetime.datetime(2018, 1, 10, 8))

File "geoloc_v2.py", line 81, in <module>
    arrival_time=datetime.datetime(2018, 1, 30, 8))
File "/opt/anaconda3.5/lib/python3.6/site-packages/googlemaps/client.py", line 356, in wrapper
    result = func(*args, **kwargs)
  File "/opt/anaconda3.5/lib/python3.6/site-packages/googlemaps/directions.py", line 150, in directions
    return client._request("/maps/api/directions/json", params)["routes"]
  File "/opt/anaconda3.5/lib/python3.6/site-packages/googlemaps/client.py", line 253, in _request
    result = self._get_body(response)
  File "/opt/anaconda3.5/lib/python3.6/site-packages/googlemaps/client.py", line 267, in _get_body
    raise googlemaps.exceptions.HTTPError(response.status_code)
googlemaps.exceptions.HTTPError: HTTP Error: 403

Am I missing a parameter? Maybe client_secret is the signature, not the crypto? if that is the case, I understand that the signature is created using the client, crypto key and url I'm querying, however the query url is a result of gmaps.directions. Hence, how do I generate the signature?

Many thanks

@guerreroda
Copy link
Author

I'm sorry. It seems this is not a problem with client.py but the HTTP 403 error comes from my Google credentials having expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant