Yeah I've already done all that. Like I said I've followed the instructions to a tee and I still get errors. I don't get the invalid character error anymore, but another error occurred. Idk if anybody else can't get it to work or I'm just the odd one hereI just flashed it from 12.0 to 12.1,still no problem with boot image extraction.
1.Download and install python.
2.Open cmd or powershell and type 'pip install -r requirements.txt' , then enter.
3.Swtich path to payload_dumper in cmd or poweshell(or you can open cmd or powershell in payload_dumper folder at the first place).
4.type 'python payload_dumper.py payload.bin ' then enter.
Never see error like invalid character ".",but I hope it might help.

Anyways I am fine now. I have just been made aware that there's actually a tool (.exe) which extracts the payload.bin for you. Here is the tool. That 100% worked for me.
There's also a more well-established tool called Payload Dumper Go, if you want to use that instead.
Why such a tool was not recommended to us in the first place, I do not know.