Remove the extra blank line from the end of the file.
If extra blank lines are to be expected in the input, you’ll need to detect and ignore them:
for line in Poly: if line == '\n': continue ...
CLICK HERE to find out more related problems solutions.