frozenpandaman / s3s

Successor to splatnet2statink. Takes battle data from the SplatNet 3 app and uploads it to stat.ink!
https://github.com/frozenpandaman/s3s/wiki
GNU General Public License v3.0
403 stars 72 forks source link

Salmon run step doesn't account for private battles, yet again #94

Closed Adrthegamedev closed 1 year ago

Adrthegamedev commented 1 year ago

As part of a bug that appears to have been broken with this commit, title_exp_before still incorrectly tries to get calculated when there was a private job, causing at least this crash:

Traceback (most recent call last):
  File "/Users/adr/s3s/s3s.py", line 1868, in <module>
    main()
  File "/Users/adr/s3s/s3s.py", line 1836, in main
    check_if_missing(which, blackout, test_run, skipprefetch) # monitoring mode hasn't begun yet
  File "/Users/adr/s3s/s3s.py", line 1350, in check_if_missing
    fetch_and_upload_single_result(id, noun, isblackout, istestrun)
  File "/Users/adr/s3s/s3s.py", line 1285, in fetch_and_upload_single_result
    post_result(result, False, isblackout, istestrun) # not monitoring mode
  File "/Users/adr/s3s/s3s.py", line 1098, in post_result
    payload = prepare_job_result(results[i]["data"], ismonitoring, isblackout, overview_data, prevresult=prevresult)
  File "/Users/adr/s3s/s3s.py", line 872, in prepare_job_result
    payload["title_before"] = utils.b64d(prev_job["data"]["coopHistoryDetail"]["afterGrade"]["id"])
frozenpandaman commented 1 year ago

That whole thing is in a if not is_private: block so it shouldn't be getting called for private jobs…

https://github.com/frozenpandaman/s3s/blob/1f81a756d7f1f0665126af466e36e7a6f70f2972/s3s.py#L853

frozenpandaman commented 1 year ago

As we discussed on Discord, it's possible that it's trying to get title_before and such from a previous private job. Or a job that you disconnected from.

Fixed in 3ea8061.