I changed my file's name from doctr.py to doctr_ocr.py and it worked. I guess we are not supposed to name it as doctr.py