Skip to content

Chapter 9 Rock Paper Scissors #5

@Anduie

Description

@Anduie

I have been having issues following along with getting errors that seemed inconsistent with what I thought I should be getting. So, I copied your source for Chapter 9 (linky) and I got the following errors:

Traceback (most recent call last):
File "(you don't need to see my roots)/RPS1.py", line 181, in
main()
File "(you don't need to see my roots)/RPS1.py", line 14, in main
show_leaderboard()
File "(you don't need to see my roots)/RPS1.py", line 31, in show_leaderboard
leaders = load_leaders()
File "(you don't need to see my roots)/RPS1.py", line 152, in load_leaders
return json.load(fin)
File "(you don't need to see my roots)\Programs\Python\Python38-32\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "(you don't need to see my roots)Programs\Python\Python38-32\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "(you don't need to see my roots)\Programs\Python\Python38-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "(you don't need to see my roots)\Programs\Python\Python38-32\lib\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)

Process finished with exit code 1

I'm getting the same errors when I'm working on my own sheet along with you and I'm on the Demo: Saving Wins lecture.

So, if I'm reading this correctly, the JSON library is not consistent with what you are wanting it to do. How would I update this library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions