yihong0618 / running_page

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

ModuleNotFoundError: No module named 'gpxpy' #260

Closed Theoshen closed 2 years ago

Theoshen commented 2 years ago

image 运行脚本的时候说无法引入gpxpy的库 但是pip3 install成功了的 这是咋回事呀

yihong0618 commented 2 years ago

看起来你 python3 和 python3.9 用的不是一个 pip 你可以试试 python3.9 -m pip install -r .....

yihong0618 commented 2 years ago

先关掉了哈,有问题随时 reopen

sauchye commented 2 years ago
执行
 python3 scripts/tcx_to_strava_sync.py x x x

报错

Traceback (most recent call last):
  File "scripts/tcx_to_strava_sync.py", line 6, in <module>
    from strava_sync import run_strava_sync
  File "/Users/sauchye/Workspace/dev/tools/running_page/scripts/strava_sync.py", line 5, in <module>
    from generator import Generator
  File "/Users/sauchye/Workspace/dev/tools/running_page/scripts/generator/__init__.py", line 6, in <module>
    from gpxtrackposter import track_loader
  File "/Users/sauchye/Workspace/dev/tools/running_page/scripts/gpxtrackposter/track_loader.py", line 20, in <module>
    from .track import Track
  File "/Users/sauchye/Workspace/dev/tools/running_page/scripts/gpxtrackposter/track.py", line 16, in <module>
    from tcxparser import TCXParser
ModuleNotFoundError: No module named 'tcxparser'

非常感谢,最近想把数据同步到strava,可能我没有配置好,执行就提示引入问题,有些通过pip3 install xxx 可以安装上,然后再执行,又安装 = =

@yihong0618

现在编译正常,还是没能成功,类似如下参数,
python3 scripts/tcx_to_strava_sync.py xxxx xxxxxxxxxx

Need to load all tcx files maybe take some time
Traceback (most recent call last):
  File "scripts/tcx_to_strava_sync.py", line 54, in <module>
    if not options.all:
AttributeError: 'Namespace' object has no attribute 'all'
yihong0618 commented 2 years ago

@sauchye pip install python-tcxparser

yihong0618 commented 2 years ago

@sauchye 抱歉,上个 PR 引入 bug 了,我修复了一下,你拉一下最新代码再跑一遍试试?如果不行在这个 issue 下留言

另外,你刚才的回复没脱敏,我给修改了。

sauchye commented 2 years ago

拉了最新代码,似乎没有tcx_to_strava_sync.py 文件夹 can't open file 'scripts/tcx_to_strava_sync.py': [Errno 2] No such file or directory @yihong0618

yihong0618 commented 2 years ago

有的,你检查一下。。。 可能代码有冲突,你可以看看 git status image

sauchye commented 2 years ago
Need to load all tcx files maybe take some time
Something wrong to get last time err: 'NoneType' object has no attribute
'get_activities'
Traceback (most recent call last):
  File "scripts/tcx_to_strava_sync.py", line 59, in <module>
    upload_file_to_strava(client, tcx_file, "tcx")
  File "/Users/sauchye/Workspace/dev/tools/running_page/scripts/utils.py", line 71, in upload_file_to_strava
    r = client.upload_activity(activity_file=f, data_type=data_type)
AttributeError: 'NoneType' object has no attribute 'upload_activity'
yihong0618 commented 2 years ago

@sauchye 修复了,又提交了一次再次抱歉。。。

sauchye commented 2 years ago

老哥牛批

Need to load all tcx files maybe take some time
False
Something wrong to get last time err: Unauthorized: Authorization Error:
[{'resource': 'AccessToken', 'field': 'activity:read_permission', 'code':
'missing'}]
Upload faild error [{'resource': 'AccessToken', 'field': 'activity:write_permission', 'code': 'missing'}]
yihong0618 commented 2 years ago

@sauchye 这个是 starva 的问题了,需要按照 README 中 starve 部分的步骤,否则是没有写的权限的。

sauchye commented 2 years ago

好的,非常感谢老哥🎈🎈

yihong0618 commented 2 years ago

客气了