dbeley / my-steam-library

A simple website to show a Steam Library.
https://dbeley.github.io/my-steam-library/
MIT License
4 stars 8 forks source link

Alway fails on Extract Steam appids of owned games #1

Open PatrickJnr opened 11 months ago

PatrickJnr commented 11 months ago
Run python steam_stats/scripts/get_ids.py -u $STEAM_USER_ID -f ids.csv -t owned
  python steam_stats/scripts/get_ids.py -u $STEAM_USER_ID -f ids.csv -t owned
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
    STEAM_API_KEY: ***
    STEAM_USER_ID: ***

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/scripts/get_ids.py", line 145, in <module>
    main()
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/scripts/get_ids.py", line 91, in main
    dict_games = get_owned_ids(api_key, user_id)
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/scripts/get_ids.py", line [2](https://github.com/PatrickJnr/my-steam-library/actions/runs/6988520974/job/19016170442#step:6:2)6, in get_owned_ids
    json_dict = requests.get(url).json()
  File "/opt/hostedtoolcache/Python/[3](https://github.com/PatrickJnr/my-steam-library/actions/runs/6988520974/job/19016170442#step:6:3).10.13/x6[4](https://github.com/PatrickJnr/my-steam-library/actions/runs/6988520974/job/19016170442#step:6:4)/lib/python3.10/site-packages/requests/models.py", line 97[5](https://github.com/PatrickJnr/my-steam-library/actions/runs/6988520974/job/19016170442#step:6:5), in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error: Process completed with exit code 1.

image

dbeley commented 11 months ago

Hey I'm not entirely sure what cause this, could you make sure that the secrets STEAM_API_KEY and STEAM_USER_ID are both set and for the same steam account?

You could also try to manually run it to help debug, it's located in this repository in the scripts folder: https://github.com/dbeley/steam_stats

PatrickJnr commented 11 months ago

I've tried to manually run it and it always got an error, that log was from a manual action

PatrickJnr commented 11 months ago

Ok @dbeley I cloned steam_stats locally, filled in the config.ini and ran the scripts.

python get_ids.py -t owned -u $STEAM_USER_ID does not work, but if I do python get_ids.py -t owned -u 76561197991348132 it works fine

PatrickJnr commented 11 months ago
Run python -m steam_stats.steam_stats -f ids.csv --export_filename game_info.csv
  python -m steam_stats.steam_stats -f ids.csv --export_filename game_info.csv
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
    STEAM_API_KEY: ***
    STEAM_USER_ID: ***

> /home/runner/work/my-steam-library/my-steam-library/steam_stats/steam_stats/__main__.py(37)get_achievements_dict()
-> "appid": app_id,
  0%|          | 0/4634 [00:00<?, ?it/s]
  0%|          | 0/4634 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/steam_stats/__main__.py", line [2](https://github.com/PatrickJnr/my-steam-library/actions/runs/7094854015/job/19310828247#step:8:2)28, in <module>
    main()
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/steam_stats/__main__.py", line 140, in main
    achievements_dict = get_achievements_dict(s, api_key, user_id, game_id)
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/steam_stats/__main__.py", line [3](https://github.com/PatrickJnr/my-steam-library/actions/runs/7094854015/job/19310828247#step:8:3)7, in get_achievements_dict
    "appid": app_id,
  File "/home/runner/work/my-steam-library/my-steam-library/steam_stats/steam_stats/__main__.py", line 37, in get_achievements_dict
    "appid": app_id,
  File "/opt/hostedtoolcache/Python/3.10.13/x6[4](https://github.com/PatrickJnr/my-steam-library/actions/runs/7094854015/job/19310828247#step:8:4)/lib/python3.10/bdb.py", line 90, in trace_dispatch
    return self.dispatch_line(frame)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/bdb.py", line 11[5](https://github.com/PatrickJnr/my-steam-library/actions/runs/7094854015/job/19310828247#step:8:5), in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit
(Pdb) 
Error: Process completed with exit code 1.