yihong0618 / running_page

Make your own running home page
https://running-page.vercel.app
MIT License
3.41k stars 978 forks source link

咕咚导出GPX运行一段之后报连接nominatim.openstreetmap.org错误 #562

Closed ROOTx2000 closed 7 months ago

ROOTx2000 commented 7 months ago

开始运行是正常的,输出日志如下:

Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx

....
Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx

运行大概10多分钟之后,重复报如下错误:

Syncing tracks '+' means new track '.' means update tracks
2023-12-06 10:08:47,474 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutErr or("HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Read timed out. (read timeout=1)")': /reverse?lat=x x.xxxxxxxxxxxx&lon=xxx.xxxxxxxxxxxxxxx&format=json&addressdetails=1

yihong0618 commented 7 months ago

开始运行是正常的,输出日志如下:

Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx

.... Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx

运行大概10多分钟之后,重复报如下错误:

Syncing tracks '+' means new track '.' means update tracks 2023-12-06 10:08:47,474 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutErr or("HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Read timed out. (read timeout=1)")': /reverse?lat=x x.xxxxxxxxxxxx&lon=xxx.xxxxxxxxxxxxxxx&format=json&addressdetails=1

可以忽略这个

ROOTx2000 commented 7 months ago

用的命令是:
python3 run_page/codoon_sync.py nnnnnnnnnn pppppppppppp --with-gpx

yihong0618 commented 7 months ago

知道,这个是获取地点出错了,不影响使用,如果一直弹这个错你需要全局的梯子

ROOTx2000 commented 7 months ago

谢谢大佬光速回复。 一直有挂全局梯子,昨天已经获取了600多条记录,之后就报错,再也没能获取到新的记录。 刚才重试的结果记录如下:

2023-12-06 10:26 开始运行,部分日志如下:

41 runs to parse
39 runs to parse
30 runs to parse
33 runs to parse
33 runs to parse
59 runs to parse
59 runs to parse
100 runs to parse
119 runs to parse
143 runs to parse
96 runs to parse
Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
...
Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx …

2023-12-06 10:44:05, 开始重复报错 'ReadTimeoutError’

Syncing tracks '+' means new track '.' means update tracks
2023-12-06 10:44:05,543 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Read timed out. (read timeout=1)")': /reverse?lat=xx.xxxxxxxxxxxx&lon=xxx.xxxxxxxxxxxxxxx&format=json&addressdetails=1
2023-12-06 10:44:06,545 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Read timed out. (read timeout=1)")': /reverse?lat=xx.xxxxxxxxxxxxx&lon=xxx.xxxxxxxxxx&format=json&addressdetails=1 … …

2023-12-06 11:28:06,开始重复报错 ’Connection refused’

2023-12-06 11:28:06,482 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused')': /reverse?lat=xx.xxxxxxxxx&lon=xxx.xxxxxxxxxxx&format=json&addressdetails=1

2023-12-06 11:28:08, 程序退出

yihong0618 commented 7 months ago
  1. 跑这个的时候记录已经都获取完了,你可以去 GPX_OUT 里 ls | wc
  2. 这个报错是获取不到地理位置了,可能有点麻烦
  3. 程序退出有报错吗?
ROOTx2000 commented 7 months ago
  1. 昨天运行完之后已经导出657条记录在GPX_OUT目录下,在咕咚app里可以看到跑步记录总共729次
  2. 获取不到地理位置,是否与我开启了“路线偏移修正”有关?

    If your points need trans from gcj02 to wgs84 coordinate which use by Mappbox TRANS_GCJ02_TO_WGS84 = True trans the coordinate data until the TRANS_END_DATE, work with TRANS_GCJ02_TO_WGS84 = True TRANS_END_DATE = "2014-03-24"

但是,2014-03-24之前的咕咚跑步记录总数不超过10条

  1. 退出没有报其它错误,最后一条错误日志仍然是上文提到的重复错误: [Errno 61] Connection refused

  2. btw,请问除了跑步记录,是否还能导出骑行记录?——找到了,有个参数控制,待会验证下 # only for running sports, if you want others, please change the True to False

ROOTx2000 commented 7 months ago

把“TRANS_GCJ02_TO_WGS84”改为“False”之后,没有报任何错误了,直接运行就结束了,没有下载到新的记录。 看起来能获取到的就是昨天这657条记录。 虽然在咕咚里看到的是729次记录。

完整的运行日志如下:

your refresh_token and user_id are xxxxxxxxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 40 runs to parse 40 runs to parse 29 runs to parse 34 runs to parse 32 runs to parse 55 runs to parse 64 runs to parse 98 runs to parse 120 runs to parse 142 runs to parse 98 runs to parse Get single run for codoon id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ID xxxxxxxxx has no total time just ignore please check No tracks found.

yihong0618 commented 7 months ago

可以的,应该有骑行,但需要你自己diy 把 run 改成 cycle 啥的试试(api

ROOTx2000 commented 7 months ago

记录已经获取完成,错误信息可以忽略

yihong0618 commented 7 months ago

@ROOTx2000 骑行可以使用 @ben-29 的 https://github.com/ben-29/workouts_page