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

Validate score files are in the right format #9

Open
PeterJCLaw opened this issue Apr 30, 2021 · 1 comment
Open

Validate score files are in the right format #9

PeterJCLaw opened this issue Apr 30, 2021 · 1 comment

Comments

@PeterJCLaw
Copy link
Owner

Specifically if the match number is a string this is incorrect but doesn't error. This results in much confusion which could be avoided by validation while loading the data.

@PeterJCLaw
Copy link
Owner Author

PeterJCLaw commented Apr 2, 2022

Worth noting that this does cause an error when loading the compstate, though the error isn't particularly helpful in identifying the source of the issue:

Traceback (most recent call last):
  File "virtualenvs/srcomp/bin/srcomp", line 33, in <module>
    sys.exit(load_entry_point('sr.comp.cli', 'console_scripts', 'srcomp')())
  File "/home/srobo/srcomp-cli/sr/comp/cli/command_line.py", line 84, in main
    settings.func(settings)
  File "/home/srobo/srcomp-cli/sr/comp/cli/validate.py", line 10, in command
    comp = SRComp(settings.compstate)
  File "/home/srobo/srcomp/sr/comp/comp.py", line 68, in __init__
    self.scores = scores.Scores.load(
  File "/home/srobo/srcomp/sr/comp/scores.py", line 424, in load
    return cls(league, knockout, tiebreaker)
  File "/home/srobo/srcomp/sr/comp/scores.py", line 449, in __init__
    lsm = scores.last_scored_match
  File "/home/srobo/srcomp/sr/comp/scores.py", line 267, in last_scored_match
    return max(num for arena, num in matches)
TypeError: '>' not supported between instances of 'str' and 'int'

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

1 participant