Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Is this the right way to get Elevation api key? #77

Closed
ValorRed opened this issue Sep 12, 2016 · 4 comments
Closed

Is this the right way to get Elevation api key? #77

ValorRed opened this issue Sep 12, 2016 · 4 comments
Labels

Comments

@ValorRed
Copy link

ValorRed commented Sep 12, 2016

Version 0.9.8.7
I got the key from
https://developers.google.com/maps/documentation/elevation/get-api-key
Put it under "GoogleAPIKey"

But getting under error when starting the bot. Then it failed to connect to Niantic server.
[21:37:15] Error: System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at PoGo.NecroBot.Logic.Model.Google.GoogleWalk..ctor(GoogleResult googleResult) in C:\projects\necrobot2\PoGo.NecroBot.Logic\Model\Google\GoogleWalk.cs:line 14
at PoGo.NecroBot.Logic.Strategies.Walk.GoogleStrategy.d__2.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\Strategies\Walk\GoogleStrategy.cs:line 38
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PoGo.NecroBot.Logic.Navigation.d__8.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\Navigation.cs:line 90
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PoGo.NecroBot.Logic.Tasks.UseNearbyPokestopsTask.d__14.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\Tasks\UseNearbyPokestopsTask.cs:line 187
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at PoGo.NecroBot.Logic.Tasks.UseNearbyPokestopsTask.d__13.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\Tasks\UseNearbyPokestopsTask.cs:line 131
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PoGo.NecroBot.Logic.Tasks.FarmPokestopsTask.d__1.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\Tasks\FarmPokestopsTask.cs:line 59
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at PoGo.NecroBot.Logic.State.FarmState.d__0.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\State\FarmState.cs:line 49
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PoGo.NecroBot.Logic.State.StateMachine.d__3.MoveNext() in C:\projects\necrobot2\PoGo.NecroBot.Logic\State\StateMachine.cs:line 63

@ajns73
Copy link

ajns73 commented Sep 12, 2016

Make sure you enable that API under that key

@mjusuf
Copy link

mjusuf commented Sep 12, 2016

#75 (comment)

@ntatoo
Copy link
Contributor

ntatoo commented Sep 12, 2016

"GoogleWalkConfig": {
"UseGoogleWalk": true,
"DefaultStepLength": 1.3,
"GoogleHeuristic": "walking",
"GoogleAPIKey": "Inside Here Your Google API",
"Cache": true

@ntatoo ntatoo closed this as completed Sep 12, 2016
@ValorRed
Copy link
Author

Thanks for the info. In the Library, besides "Google Maps Elevation API", is there any other API I shall enable? I remember the first time when the Google Walk was introduced, there was a Wiki. It says there are 2 API need to enable, I lost track of it.

samuraitruong pushed a commit that referenced this issue Feb 12, 2017
More error handling to make sure we can transfer pokemon from WPF gui.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants