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

Alway fails on Extract Steam appids of owned games #1

Open
PatrickJnr opened this issue Nov 25, 2023 · 4 comments
Open

Alway fails on Extract Steam appids of owned games #1

PatrickJnr opened this issue Nov 25, 2023 · 4 comments

Comments

@PatrickJnr
Copy link

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
Copy link
Owner

dbeley commented Dec 1, 2023

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
Copy link
Author

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

@PatrickJnr
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants