Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过github action执行报错Locator expected to have text 'View In Cart' #225

Closed
LPLNGU opened this issue Oct 27, 2023 · 0 comments
Closed
Labels
fixed BUG 已修复或问题已解决

Comments

@LPLNGU
Copy link

LPLNGU commented Oct 27, 2023

首先还是感谢大佬开发!
启动项目中报错如下:

2023-10-27 02:30:24 | INFO - run - {'image': '20231026', 'role': 'EpicPlayer', 'headless': True, 'self_supervised': True}

Installing models/objects.yaml:   0%|          | 0.00/2.88k [00:00<?, ?B/s]
Installing models/objects.yaml: 100%|██████████| 2.88k/2.88k [00:00<00:00, 3.96MB/s]

Installing models/visual_CLIP_RN50.openai.onnx:   0%|          | 0.00/146M [00:00<?, ?B/s]
Installing models/visual_CLIP_RN50.openai.onnx:   3%|▎         | 4.61M/146M [00:00<00:03, 48.3MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  12%|█▏        | [17](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:18).9M/146M [00:00<00:01, 102MB/s] 
Installing models/visual_CLIP_RN50.openai.onnx:  22%|██▏       | 31.8M/146M [00:00<00:00, 122MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  31%|███       | 44.9M/146M [00:00<00:00, 128MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  40%|███▉      | 58.2M/146M [00:00<00:00, 132MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  49%|████▉     | 71.2M/146M [00:00<00:00, 134MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  58%|█████▊    | 84.4M/146M [00:00<00:00, 135MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  67%|██████▋   | 97.2M/146M [00:00<00:00, 132MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  76%|███████▌  | 111M/146M [00:00<00:00, 135MB/s] 
Installing models/visual_CLIP_RN50.openai.onnx:  85%|████████▍ | 124M/146M [00:01<00:00, 136MB/s]
Installing models/visual_CLIP_RN50.openai.onnx:  95%|█████████▍| 138M/146M [00:01<00:00, 140MB/s]
Installing models/visual_CLIP_RN50.openai.onnx: 100%|██████████| 146M/146M [00:01<00:00, 132MB/s]

Installing models/textual_CLIP_RN50.openai.onnx:   0%|          | 0.00/244M [00:00<?, ?B/s]
Installing models/textual_CLIP_RN50.openai.onnx:   0%|          | 712k/244M [00:00<00:38, 6.69MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   1%|          | 1.84M/244M [00:00<00:26, 9.69MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   1%|          | 2.92M/244M [00:00<00:24, 10.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   2%|▏         | 4.22M/244M [00:00<00:21, 11.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   2%|▏         | 5.45M/244M [00:00<00:20, 12.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   3%|▎         | 6.64M/244M [00:00<00:20, 12.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   3%|▎         | 8.01M/244M [00:00<00:19, 12.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   4%|▍         | 9.36M/244M [00:00<00:[18](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:19), 13.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   4%|▍         | 10.6M/244M [00:00<00:18, 13.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   5%|▍         | 12.0M/244M [00:01<00:17, 13.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   6%|▌         | 13.5M/244M [00:01<00:16, 14.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   6%|▌         | 15.0M/244M [00:01<00:16, 14.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   7%|▋         | 16.5M/244M [00:01<00:15, 15.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   7%|▋         | 18.2M/244M [00:01<00:15, 15.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   8%|▊         | [19](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:20).9M/244M [00:01<00:14, 16.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   9%|▉         | 21.4M/244M [00:01<00:14, 16.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:   9%|▉         | 23.1M/244M [00:01<00:14, 16.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  10%|█         | 24.8M/244M [00:01<00:16, 14.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  11%|█         | 26.6M/244M [00:01<00:14, 15.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  12%|█▏        | 28.4M/244M [00:02<00:13, 16.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  12%|█▏        | 30.3M/244M [00:02<00:12, 17.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  13%|█▎        | 32.1M/244M [00:02<00:12, 17.7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  14%|█▍        | 33.9M/244M [00:02<00:12, 18.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  15%|█▍        | 35.9M/244M [00:02<00:11, 18.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  16%|█▌        | 38.0M/244M [00:02<00:10, 19.7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  16%|█▋        | 40.2M/244M [00:02<00:10, [20](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:21).5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  17%|█▋        | 42.3M/244M [00:02<00:10, 20.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  18%|█▊        | 44.3M/244M [00:02<00:10, 20.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  19%|█▉        | 46.5M/244M [00:02<00:09, [21](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:22).5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  20%|█▉        | 48.7M/244M [00:03<00:09, 21.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  21%|██        | 51.1M/244M [00:03<00:08, [22](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:23).8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  22%|██▏       | 53.4M/244M [00:03<00:08, [23](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:24).3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  23%|██▎       | 55.8M/[24](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:25)4M [00:03<00:08, 23.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  24%|██▍       | 58.0M/244M [00:03<00:08, 23.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [25](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:26)%|██▍       | 60.4M/244M [00:03<00:08, 23.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [26](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:27)%|██▌       | 62.8M/244M [00:03<00:07, 24.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [27](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:28)%|██▋       | 65.4M/244M [00:03<00:07, 25.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [28](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:29)%|██▊       | 68.0M/244M [00:03<00:07, 25.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [29](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:30)%|██▉       | 70.6M/244M [00:04<00:06, 26.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [30](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:31)%|███       | 73.2M/244M [00:04<00:06, 26.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [31](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:32)%|███       | 75.8M/244M [00:04<00:06, 26.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [32](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:33)%|███▏      | 78.6M/244M [00:04<00:06, 27.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  [33](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:34)%|███▎      | 81.3M/244M [00:04<00:06, 27.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  35%|███▍      | 84.1M/244M [00:04<00:05, 28.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  36%|███▌      | 86.9M/244M [00:04<00:05, 28.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  37%|███▋      | 89.7M/244M [00:04<00:05, 28.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  38%|███▊      | 92.4M/244M [00:04<00:05, 28.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  39%|███▉      | 95.2M/244M [00:04<00:05, 28.7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  40%|████      | 98.1M/244M [00:05<00:05, 29.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  41%|████▏     | 101M/244M [00:05<00:05, 29.6MB/s] 
Installing models/textual_CLIP_RN50.openai.onnx:  43%|████▎     | 104M/244M [00:05<00:04, 30.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  44%|████▍     | 107M/244M [00:05<00:04, 30.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  45%|████▌     | 110M/244M [00:05<00:04, 30.7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  46%|████▋     | 113M/244M [00:05<00:04, 31.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  48%|████▊     | 116M/244M [00:05<00:04, 31.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  49%|████▉     | 119M/244M [00:05<00:04, 28.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  50%|█████     | 122M/244M [00:05<00:04, 27.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  51%|█████▏    | 125M/244M [00:05<00:04, 26.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  52%|█████▏    | 127M/244M [00:06<00:04, 25.7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  53%|█████▎    | 130M/244M [00:06<00:04, 25.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  54%|█████▍    | 132M/244M [00:06<00:04, 25.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  55%|█████▌    | 135M/244M [00:06<00:04, 25.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  56%|█████▋    | 137M/244M [00:06<00:04, 25.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  57%|█████▋    | 140M/244M [00:06<00:04, 25.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  58%|█████▊    | 142M/244M [00:06<00:04, 25.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  60%|█████▉    | 145M/244M [00:06<00:04, 25.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  61%|██████    | 148M/244M [00:06<00:03, 25.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  62%|██████▏   | 150M/244M [00:07<00:03, 26.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  63%|██████▎   | 153M/244M [00:07<00:03, 27.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  64%|██████▍   | 156M/244M [00:07<00:03, 27.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  65%|██████▌   | 159M/244M [00:07<00:03, 28.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  66%|██████▋   | 161M/244M [00:07<00:03, 28.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  67%|██████▋   | 164M/244M [00:07<00:02, 28.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  69%|██████▊   | 167M/244M [00:07<00:02, 28.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  70%|██████▉   | 170M/244M [00:07<00:02, 29.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  71%|███████   | 173M/244M [00:07<00:02, 30.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  72%|███████▏  | 176M/244M [00:07<00:02, 30.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  74%|███████▎  | 179M/244M [00:08<00:02, 30.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  75%|███████▍  | 182M/244M [00:08<00:02, 31.1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  76%|███████▌  | 186M/244M [00:08<00:01, 32.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  78%|███████▊  | 189M/244M [00:08<00:01, 32.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  79%|███████▉  | 192M/244M [00:08<00:01, 33.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  80%|████████  | 195M/244M [00:08<00:01, 32.0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  82%|████████▏ | 199M/244M [00:08<00:01, 32.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  83%|████████▎ | 202M/244M [00:08<00:01, 33.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  84%|████████▍ | 205M/244M [00:08<00:01, 33.3MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  86%|████████▌ | 209M/244M [00:08<00:01, [34](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:35).4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  87%|████████▋ | 212M/244M [00:09<00:00, [35](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:36).0MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  89%|████████▊ | 216M/244M [00:09<00:00, 35.4MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  90%|████████▉ | 219M/244M [00:09<00:00, 35.5MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  91%|█████████▏| 222M/244M [00:09<00:00, 35.2MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  93%|█████████▎| 226M/244M [00:09<00:00, 35.9MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  94%|█████████▍| 230M/244M [00:09<00:00, [36](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:37).7MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  96%|█████████▌| 233M/244M [00:09<00:00, [37](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:38).1MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  97%|█████████▋| 237M/244M [00:09<00:00, 37.6MB/s]
Installing models/textual_CLIP_RN50.openai.onnx:  99%|█████████▉| 241M/244M [00:09<00:00, 37.8MB/s]
Installing models/textual_CLIP_RN50.openai.onnx: 100%|██████████| 244M/244M [00:09<00:00, 25.7MB/s]
2023-10-27 02:30:43 | INFO - Try to flush cookie - {'task': 'claim_epic_games'}
2023-10-27 02:30:47 | SUCCESS - login - {'result': 'Successfully refreshed tokens'}
2023-10-27 02:30:58 | SUCCESS - flush_token - {'path': PosixPath('/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/user_data_dir/epic-games@1075542875/ctx_cookie.json')}
2023-10-27 02:30:58 | WARNING - Failed to get order history, cookie may have expired - {}
2023-10-27 02:30:59 | DEBUG - Put task - {'title': 'The Evil Within 2', 'url': 'https://store.epicgames.com/en-US/p/the-evil-within-2'}
2023-10-27 02:30:59 | INFO - claim_weekly_games - {'action': 'go to store', 'url': 'https://store.epicgames.com/en-US/p/the-evil-within-2'}
2023-10-27 02:31:11 | ERROR - An error has been caught in function 'run', process 'MainProcess' (3675), thread 'MainThread' (1[40](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:41)1340209181[44](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:45)): - {}
Traceback (most recent call last):
  File "/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/src/claim.py", line 159, in <module>
    asyncio.run(run())
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/src/claim.py", line 155, in run
    await agent.stash()
  File "/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/src/claim.py", line 148, in stash
    await self.claim_epic_games(context)
  File "/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/src/claim.py", line 120, in claim_epic_games
    await epic.claim_weekly_games(page, single_promotions)
  File "/home/runner/work/PickEpicAutomaticly/PickEpicAutomaticly/epic/src/epic_games/agent.py", line 248, in claim_weekly_games
    await expect(cta_btn).to_have_text("View In Cart")
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 20080, in to_have_text
    await self._impl_obj.to_have_text(
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/playwright/_impl/_assertions.py", line [45](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:46)5, in to_have_text
    await self._expect_impl(
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/playwright/_impl/_assertions.py", line 70, in _expect_impl
    raise AssertionError(f"{out_message}\nActual value: {actual} {log}")
AssertionError: Locator expected to have text 'View In Cart'
Actual value: None 
Call log:
LocatorAssertions.to_have_text with timeout [50](https://github.com/LPLNGU/PickEpicAutomaticly/actions/runs/6658282718/job/18094774815#step:6:51)00ms
waiting for locator("xpath=//aside//button[@data-testid='add-to-cart-cta-button']")

看似是没有成功添加购物车?

@QIN2DIM QIN2DIM added the bug Something isn't working label Oct 28, 2023
DengYuncheng27 added a commit to DengYuncheng27/epic-awesome-gamer that referenced this issue Oct 28, 2023
1. modify login choose button css
2. modify go to url_claim time
@QIN2DIM QIN2DIM removed the bug Something isn't working label Oct 28, 2023
@QIN2DIM QIN2DIM closed this as completed Oct 28, 2023
QIN2DIM added a commit that referenced this issue Oct 28, 2023
* fixed: #225 (#226)
1. modify login choose button css
2. modify go to url_claim time

* fix(epic-games): Compatible with new EPIC Store UI

---------

Co-authored-by: QIN2DIM <62018067+QIN2DIM@users.noreply.github.com>
@QIN2DIM QIN2DIM added the fixed BUG 已修复或问题已解决 label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed BUG 已修复或问题已解决
Projects
None yet
Development

No branches or pull requests

3 participants
@LPLNGU @QIN2DIM and others