Hi guys, I just wanted to say thank you to @bhepler and @sdetweil for trying to help me with this problem.

In the end I just used a very old backup at first and updated it, which worked fine at first and yesterday I tried setting my RPi up from scratch again and it worked perfectly!

I’m sorry for anybody who encounters the same error and tries finding answers here, sadly there doesn’t seem to be a perfect solution for this.