Unable to determine error

For some reason, the datapack I made does not work. I have checked and there seems to be no syntax error. I have attached the datapack for your reference. Here are the error screenshots in the log
Continue to help post