I see, the acutal reason missing in all answers. Its because you are trying to open a large file using Document() , which throws package not fount exception. Try to use docx2txt or other libs for the same usecase , it will work .