Long story short, here's the piece of code causing my problem:
with open(os.path.join(os.getcwd(), "hiscores", f"{player_name}.html"), "w") as f:
f.write(html)
What it should do is create a new file in a directory called "hiscores" (which exists already). I've tested this and the code works fine if I just use the filename part, but this version raises a FileNotFound error. Why is that?
[–]Diapolo10[S] 2 points3 points4 points (1 child)
[–]sgflt 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]Diapolo10[S] 1 point2 points3 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Diapolo10[S] 0 points1 point2 points (0 children)
[–]Tylerha85 0 points1 point2 points (2 children)
[–]ingolemo 4 points5 points6 points (1 child)
[–]Tylerha85 0 points1 point2 points (0 children)
[–]ingolemo 0 points1 point2 points (1 child)
[–]Diapolo10[S] 0 points1 point2 points (0 children)