chadrockey / TGC-Designer-Tools

Tools to support course creation and Lidar/Terrain Creation in The Golf Club 2019.
Apache License 2.0
44 stars 27 forks source link

An unknown network error has occurred. Please try again later. Error code: HB-RS[1706] #71

Open dmigliorisi opened 3 years ago

dmigliorisi commented 3 years ago

After completing all steps in the tutorial including the OSM tracing, when I input the new course file into TGC and try to edit the course I receive the error: An unknown network error has occurred. Please try again later. Error code: HB-RS[1706].

The course I was creating was Colts Neck Golf Club in Colts Neck, NJ. OSM

Lidar data is available from The National Map

falk-herrmann commented 3 years ago

Same to me but only once or twice in 10 with the GUI. I test around to find out some more details to this sporadic error.

I wrote a small pack/unpack routine in a different language (PHP) and compared the (pretty) json files. All the same but roundings!

After removing rounding and keep all position after decimal point the the issue was gone. Maybe sometimes a rounded values is out of range and the network error occurs. Cutting can be a better solution. Values can not be out of range if six or more digits will cut to three.

<         f.write(json.dumps(json.loads(json.dumps(course_json), parse_float=lambda x: round(float(x), 3)), separators=(',', ':')))
---
>         f.write(json.dumps(course_json, separators=(',', ':')))
...
116c116
<     "greenFringeRadius": 0.5049233,
---
>     "greenFringeRadius": 0.505,
180,182c180,182
<     "sunOrientation": 1.5453186,
<     "sunInclination": 61.1198158,
<     "timeOfDay": 0.418483883,
---
>     "sunOrientation": 1.545,
>     "sunInclination": 61.12,
>     "timeOfDay": 0.418,
199c199
<                     "x": 173.105957,
---
>                     "x": 173.106, 
...