Problem with reading scanned pdf

when I tried codes from you guys this window apperaed on the assign where I put the code