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

More reliable and simpler canteen list handling #283

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

COM8
Copy link
Member

@COM8 COM8 commented Feb 9, 2025

Fixes #282 by directly providing a --canteen-ids parameter that prints canteen id and exits.
That way we do not have to rely on the additional parser script that can handle only stdin input.

Fixes the following CI crash:

Traceback (most recent call last):
  File "/home/runner/work/eat-api/eat-api/scripts/parse_canteen_list.py", line 7, in <module>
    canteens = json.load(sys.stdin)
               ^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/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)

https://github.com/TUM-Dev/eat-api/actions/runs/13218416986/job/36900479138

@COM8 COM8 added the bug Something isn't working label Feb 9, 2025
@COM8 COM8 requested a review from Friendly-Banana February 9, 2025 11:44
@COM8 COM8 self-assigned this Feb 9, 2025
@COM8 COM8 force-pushed the fix/parser-fails-combining branch from 79e2037 to 659bf02 Compare February 9, 2025 11:47
@COM8 COM8 mentioned this pull request Feb 9, 2025
Copy link

@Friendly-Banana Friendly-Banana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@COM8 COM8 merged commit f1a1d5f into master Feb 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

combined.json Empty/Broken
2 participants