Eight Queens Python - Kattis : Attempting the Eight Queens problem in python (https://open.kattis.com/problems/8queens).

I've written some code which works for all input I've been able to imagine for the last hour - but the program still fails the Kattis test cases.

This is the code:

https://paste.ofcode.org/9KMu88hkfuR2hrF6YSkWne

It's not very efficient, or well structured, but since the problem shouldnt require speed I didnt really care.

What I'm doing is checking every position, if there is a queen there - I check horizontally, vertically and diagonally. I figured that it's probably the diagonal checking code that's wrong since the other 2 are very straight forward, but I can't figure it out...

Thanks for help!