Closed grimmett closed 1 year ago
Can you run the command with --debug
? I think that will output the MapQuest URL that you can open to get more information.
That sounds like a response from the MapQuest API though so I lean towards it being an invalid key.
Can you run the command with
--debug
? I think that will output the MapQuest URL that you can open to get more information.That sounds like a response from the MapQuest API though so I lean towards it being an invalid key.
Isn't the command I ran with the --debug
? The code I used was import --debug --destination=...
Can you run the command with
--debug
? I think that will output the MapQuest URL that you can open to get more information.That sounds like a response from the MapQuest API though so I lean towards it being an invalid key.
Key is ok, if I use it directly in the Mapquest API sample URL, it works. So not an invalid key. Must be something else?
Is the key correct in config.ini
? Could you share the URL with the key stripped?
Is the key correct in
config.ini
? Could you share the URL with the key stripped?
Key is correct in config.ini
This is the URL from the test online that worked with part of my key stripped
https://www.mapquestapi.com/geocoding/v1/reverse?key=JKUE**********9kYLzneaoLiWxFl9rU&location=49.268363,-123.113666&includeRoadMetadata=true&includeNearestIntersection=true
I just reran tests from the master
branch and everything passed.
https://app.circleci.com/pipelines/github/jmathai/elodie/91/workflows/6e2eecfb-4d5e-401a-bd0c-4c521be9c983/jobs/77
You can try the test key which can be found here: https://github.com/jmathai/elodie/blob/master/elodie/tests/run_tests.py#L30
I just reran tests from the
master
branch and everything passed. https://app.circleci.com/pipelines/github/jmathai/elodie/91/workflows/6e2eecfb-4d5e-401a-bd0c-4c521be9c983/jobs/77You can try the test key which can be found here: https://github.com/jmathai/elodie/blob/master/elodie/tests/run_tests.py#L30
Hmmm... I get the same error with the test key.
I'm going to try and do a fresh download and see if that works, maybe I changed something without knowing/realizing it?
You could add a log.info
here. If it helps then feel free to submit as a pull request against this issue.
https://github.com/jmathai/elodie/blob/3e88440d2393915c15f037a4ac7200a08a945d00/elodie/geolocation.py#L214
url = '%s%s?%s' % (
constants.mapquest_base_url,
path,
urllib.parse.urlencode(params)
)
# log the MapQuest url
log.info('MapQuest url: %s' % (url))
r = requests.get(url, headers=headers)
I changed it to the following
'''try: headers = {} params = {'format': 'json', 'key': key} if(prefer_english_names): headers = {'Accept-Language':'en-EN,en;q=0.8'} params['locale'] = 'en_US' params.update(kwargs) path = '/geocoding/v1/address' if('lat' in kwargs and 'lon' in kwargs): path = '/geocoding/v1/reverse' url = '%s%s?%s' % ( constants.mapquest_base_url, path, urllib.parse.urlencode(params) )
# Save the MapQuest URL to a variable
mapquest_url = url
# log the MapQuest url
log.info('MapQuest url: %s' % (url))
# Write the MapQuest URL to a file
with open('results.txt', 'a') as f:
f.write(url + '\n')
r = requests.get(url, headers=headers)
return parse_result(r.json())'''
And the results.txt
file is as follows
https://www.mapquestapi.com/geocoding/v1/reverse?format=json&key=your-api-key-goes-here&locale=en_US&lat=49.2760722222222&lon=-123.130730555556&location=49.2760722222222%2C-123.130730555556
Where is it getting the key=your-api-key-goes-here
from? I have checked my config.ini file, the API key is correct
Sorry, I'm new to this, I don't know how to make all the code above post as code it seems!
I appreciate your help, and am really excited to start using Elodie to sort out my photos, I've got about 200,000 that are all over the place
Can you paste the following?
config.ini
config.ini
(subtract key)Location is ~elodie/.elodie/config.ini
And the contents are
[MapQuest]
key=********
prefer_english_names=False
Can you move your .elodie
folder up one directory into the root of your home directory ~
and try again?
Bingo! Thank you so much for working through this with me! I appreciate it. And now feel a little silly, as this was one of the errors that was resolved before, it just seemed to be presenting itself a bit different to me for some reason.
Thanks!
Apologies if this is covered in past issues, I spent a fair bit of time looking for the same issue in the open and closed issues, but couldn't find it.
I just downloaded Elodie, and I'm getting the following error when I try and run the first test:
Is my Mapquest key invalid? Or is the JSON output not being understood?