Re: [Golden-Cheetah-Users] Fix Elevation using Open-Elevation public API

121 views
Skip to first unread message

Poncho

unread,
Aug 24, 2022, 3:05:10 AM8/24/22
to golden-che...@googlegroups.com
Doesn't work here unfortunately. I get:

> The following problem occured: Network error: 299

GC built from source. Current git master as of today.


On 20.08.22 00:45, Ale Martinez wrote:
> MapQuest elevation API used by Edit > Fix Elevation reaches EOL in aug-31,
> there is PR replacing it by Open-Elevation API with Windows installer
> available
> at https://ci.appveyor.com/project/Joern-R/goldencheetah-knhd8/builds/44524357/artifacts
> Feedback is welcome before merging to master.
> Regards, Ale.
>

Ale Martinez

unread,
Aug 24, 2022, 7:42:46 AM8/24/22
to golden-cheetah-users
El miércoles, 24 de agosto de 2022 a la(s) 04:05:10 UTC-3, Poncho escribió:
Doesn't work here unfortunately. I get:

> The following problem occured: Network error: 299

If this happens with a specific file, please attach it
 
GC built from source. Current git master as of today.

Otherwise and since you are building from source, you could add 
qDebug()<<latLngCollection;
Then rebuild and try again looking at the console output to see the request provoking the error.

Poncho

unread,
Aug 24, 2022, 9:05:52 AM8/24/22
to golden-che...@googlegroups.com
Hi Ale

> If this happens with a specific file, please attach it

It happens with all the activities

>> GC built from source. Current git master as of today.
>>
>
> Otherwise and since you are building from source, you could add
> qDebug()<<latLngCollection;
> at
> https://github.com/GoldenCheetah/GoldenCheetah/blob/0108a05f5ae97e4b595f10e2fe85bc1a3ac836a9/src/FileIO/FixElevation.cpp#L264
> Then rebuild and try again looking at the console output to see the request
> provoking the error.
>

I've added the qDebug statment.
It always fails after the 6th request. Doesn't seem related to the
actual coordinates since entering the result of latLngCollection
manually at https://api.open-elevation.com/api/v1/lookup?locations=
works fine.

I think that some rate limiting might be the issue.

Indeed. Adding sleep(1) makes the function work without throwing an error.

Ale Martinez

unread,
Aug 24, 2022, 9:13:28 AM8/24/22
to golden-cheetah-users
It makes sense, thank you. We would need to switch to Post method to avoid sending that many requests. 

Ale Martinez

unread,
Aug 25, 2022, 12:54:59 PM8/25/22
to golden-cheetah-users
I changed Fix Elevation to use post instead of get and, since the API has no limits in this case, we can send just one request, it seems to work: https://github.com/GoldenCheetah/GoldenCheetah/commit/f8b6cc6c17382ea09824be7640334b99edbf05f6
Reply all
Reply to author
Forward
0 new messages