[GH-ISSUE #212] auto-py-to-exe is not including the EASYOCR package after converting python file to exe #194

Closed
opened 2026-02-26 12:20:47 +03:00 by kerem · 11 comments
Owner

Originally created by @savitha958 on GitHub (Nov 15, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/212

In Python Script, easyocr package is imported using command "import easyocr"
but after converting python script py file into exe using auto-py-to-exe the easyocr package is not included and its not working
i gave one directory mode , i searched for easy ocr folder, it is not there.
this is found using message box after giving easy ocr usage lines

pls fix auto-py-to-exe

Originally created by @savitha958 on GitHub (Nov 15, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/212 In Python Script, easyocr package is imported using command "import easyocr" but after converting python script py file into exe using auto-py-to-exe the easyocr package is not included and its not working i gave one directory mode , i searched for easy ocr folder, it is not there. this is found using message box after giving easy ocr usage lines pls fix auto-py-to-exe
kerem 2026-02-26 12:20:47 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@brentvollebregt commented on GitHub (Nov 15, 2021):

If you follow the debugging section of my help post, are you getting any errors?

<!-- gh-comment-id:969227709 --> @brentvollebregt commented on GitHub (Nov 15, 2021): If you follow the debugging section of my help post, are you getting any errors?
Author
Owner

@savitha958 commented on GitHub (Nov 16, 2021):

Thanks for the Quick reply.

There is no error but there is no response

I gave reader = easyocr.Reader(language="En",GPU=~False)

After that I gave messagebox.showinfo("Information",Easyocr is imported)

I did this part because after giving submit part there is no response from
the desktop app I developed.

For debugging purpose I gave message box for all package so that's why
found Easyocr is not imported

After converting py to exe

That line of code is not working
Because Easyocr was not included by the auto py to exe

If u perforn Easyocr demo python script check whether it is importing or
after converting py to exe,then u fill now

I can't share my code it is company file

Savitha S

On Tue, Nov 16, 2021, 12:38 AM Brent Vollebregt @.***>
wrote:

If you follow the debugging section of my help post, are you getting any
errors?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/brentvollebregt/auto-py-to-exe/issues/212#issuecomment-969227709,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANKI5XFDMQF3AT7R4WOWZ4TUMFLDNANCNFSM5IBS7TIQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

<!-- gh-comment-id:969779311 --> @savitha958 commented on GitHub (Nov 16, 2021): Thanks for the Quick reply. There is no error but there is no response I gave reader = easyocr.Reader(language="En",GPU=~False) After that I gave messagebox.showinfo("Information",Easyocr is imported) I did this part because after giving submit part there is no response from the desktop app I developed. For debugging purpose I gave message box for all package so that's why found Easyocr is not imported After converting py to exe That line of code is not working Because Easyocr was not included by the auto py to exe If u perforn Easyocr demo python script check whether it is importing or after converting py to exe,then u fill now I can't share my code it is company file Savitha S On Tue, Nov 16, 2021, 12:38 AM Brent Vollebregt ***@***.***> wrote: > If you follow the debugging section of my help post, are you getting any > errors? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/brentvollebregt/auto-py-to-exe/issues/212#issuecomment-969227709>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ANKI5XFDMQF3AT7R4WOWZ4TUMFLDNANCNFSM5IBS7TIQ> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > >
Author
Owner

@savitha958 commented on GitHub (Nov 16, 2021):

Correction in my mail

On Tue, Nov 16, 2021, 8:49 AM Savitha S @.***> wrote:

Thanks for the Quick reply.

There is no error but there is no response

I gave reader = easyocr.Reader(language="En",GPU=False)

After that I gave messagebox.showinfo("Information",Easyocr is imported)

I did this part because after giving submit part there is no response from
the desktop app I developed.

For debugging purpose I gave message box for all package so that's why
found Easyocr is not imported

After converting py to exe

That line of code is not working
Because Easyocr was not included by the auto py to exe

If u perforn Easyocr demo python script check whether it is importing or
after converting py to exe,then u fill now

I can't share my code it is company file

Savitha S

On Tue, Nov 16, 2021, 12:38 AM Brent Vollebregt @.***>
wrote:

If you follow the debugging section of my help post, are you getting any
errors?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/brentvollebregt/auto-py-to-exe/issues/212#issuecomment-969227709,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANKI5XFDMQF3AT7R4WOWZ4TUMFLDNANCNFSM5IBS7TIQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

<!-- gh-comment-id:969780993 --> @savitha958 commented on GitHub (Nov 16, 2021): Correction in my mail On Tue, Nov 16, 2021, 8:49 AM Savitha S ***@***.***> wrote: > Thanks for the Quick reply. > > There is no error but there is no response > > I gave reader = easyocr.Reader(language="En",GPU=False) > > After that I gave messagebox.showinfo("Information",Easyocr is imported) > > I did this part because after giving submit part there is no response from > the desktop app I developed. > > For debugging purpose I gave message box for all package so that's why > found Easyocr is not imported > > After converting py to exe > > That line of code is not working > Because Easyocr was not included by the auto py to exe > > > If u perforn Easyocr demo python script check whether it is importing or > after converting py to exe,then u fill now > > I can't share my code it is company file > > Savitha S > > > > On Tue, Nov 16, 2021, 12:38 AM Brent Vollebregt ***@***.***> > wrote: > >> If you follow the debugging section of my help post, are you getting any >> errors? >> >> — >> You are receiving this because you authored the thread. >> Reply to this email directly, view it on GitHub >> <https://github.com/brentvollebregt/auto-py-to-exe/issues/212#issuecomment-969227709>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ANKI5XFDMQF3AT7R4WOWZ4TUMFLDNANCNFSM5IBS7TIQ> >> . >> Triage notifications on the go with GitHub Mobile for iOS >> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> >> or Android >> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. >> >> >
Author
Owner

@brentvollebregt commented on GitHub (Nov 16, 2021):

I'm confused - is there no error? There should at least be an error when you try to use the package when you try to import easyocr.

<!-- gh-comment-id:969916901 --> @brentvollebregt commented on GitHub (Nov 16, 2021): I'm confused - is there no error? There should at least be an error when you try to use the package when you try to import `easyocr`.
Author
Owner

@savitha958 commented on GitHub (Nov 16, 2021):

Yes there is no error in conversion. But after conversion the easyocr part
is not working, try this you will understand.

-- coding: utf-8 --

"""
Created on Tue Nov 16 12:41:58 2021

@author: SSRIDH46
"""

from tkinter import *
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from tkinter import messagebox
from PIL import Image
import easyocr

root = Tk( )

def readFimage():
global path
path = PathTextBox.get('1.0','end-1c')
if path:
#im = Image.open(path)

    reader = easyocr.Reader(['en'], gpu=False)
    messagebox.showinfo("Information", "EasyOCR is imported")
    text = reader.readtext(path  ,paragraph="True",detail=0)


       
    ResultTextBox.delete('1.0',END)
    ResultTextBox.insert(END,text)
else:
    ResultTextBox.delete('1.0',END)
    ResultTextBox.insert(END,"FILE CANNOT BE READ")

def OpenFile():
name = askopenfilename(initialdir="/",
filetypes =(("PNG File", ".png"),("BMP File", ".bmp"),("JPEG File", "*.jpeg")),
title = "Choose a file."
)
PathTextBox.delete("1.0",END)
PathTextBox.insert(END,name)
Title = root.title( "Image Reader!")
path = StringVar()

HeadLabel1 = Label(root,text="Image ")
HeadLabel1.grid(row = 1,column = 1,sticky=(E))
HeadLabel2 = Label(root,text=" Reader")
HeadLabel2.grid(row = 1,column = 2,sticky=(W))

InputLabel = Label(root,text = "INPUT IMAGE:")
InputLabel.grid(row=2,column = 1)

BrowseButton = Button(root,text="Browse",command = OpenFile)
BrowseButton.grid(row=2,column=2)

PathLabel = Label(root,text = "Path:")
PathLabel.grid(row = 3,column=1,sticky=(W))

PathTextBox = Text(root,height = 2)
PathTextBox.grid(row = 4,column = 1,columnspan=2)

ReadButton = Button(root,text="READ FROM IMAGE",command = readFimage)
ReadButton.grid(row = 5,column = 2)

DataLabel = Label(root,text = "DATA IN IMAGE:")
DataLabel.grid(row = 6,column=1,sticky=(W))

ResultTextBox = Text(root,height = 6)
ResultTextBox.grid(row = 7,column = 1,columnspan=2)

root.mainloop()

<!-- gh-comment-id:969984490 --> @savitha958 commented on GitHub (Nov 16, 2021): Yes there is no error in conversion. But after conversion the easyocr part is not working, try this you will understand. # -*- coding: utf-8 -*- """ Created on Tue Nov 16 12:41:58 2021 @author: SSRIDH46 """ from tkinter import * from tkinter import ttk from tkinter.filedialog import askopenfilename from tkinter import messagebox from PIL import Image import easyocr root = Tk( ) def readFimage(): global path path = PathTextBox.get('1.0','end-1c') if path: #im = Image.open(path) reader = easyocr.Reader(['en'], gpu=False) messagebox.showinfo("Information", "EasyOCR is imported") text = reader.readtext(path ,paragraph="True",detail=0) ResultTextBox.delete('1.0',END) ResultTextBox.insert(END,text) else: ResultTextBox.delete('1.0',END) ResultTextBox.insert(END,"FILE CANNOT BE READ") def OpenFile(): name = askopenfilename(initialdir="/", filetypes =(("PNG File", "*.png"),("BMP File", "*.bmp"),("JPEG File", "*.jpeg")), title = "Choose a file." ) PathTextBox.delete("1.0",END) PathTextBox.insert(END,name) Title = root.title( "Image Reader!") path = StringVar() HeadLabel1 = Label(root,text="Image ") HeadLabel1.grid(row = 1,column = 1,sticky=(E)) HeadLabel2 = Label(root,text=" Reader") HeadLabel2.grid(row = 1,column = 2,sticky=(W)) InputLabel = Label(root,text = "INPUT IMAGE:") InputLabel.grid(row=2,column = 1) BrowseButton = Button(root,text="Browse",command = OpenFile) BrowseButton.grid(row=2,column=2) PathLabel = Label(root,text = "Path:") PathLabel.grid(row = 3,column=1,sticky=(W)) PathTextBox = Text(root,height = 2) PathTextBox.grid(row = 4,column = 1,columnspan=2) ReadButton = Button(root,text="READ FROM IMAGE",command = readFimage) ReadButton.grid(row = 5,column = 2) DataLabel = Label(root,text = "DATA IN IMAGE:") DataLabel.grid(row = 6,column=1,sticky=(W)) ResultTextBox = Text(root,height = 6) ResultTextBox.grid(row = 7,column = 1,columnspan=2) root.mainloop()
Author
Owner

@brentvollebregt commented on GitHub (Nov 16, 2021):

I'm not meaning is there an error during conversion, I'm meaning is there an error when running the exe. I'm hoping you read the help post and followed the debugging steps before asking for help here - what did you see in the console, no error?

<!-- gh-comment-id:969997729 --> @brentvollebregt commented on GitHub (Nov 16, 2021): I'm not meaning is there an error during conversion, I'm meaning is there an error when running the exe. I'm hoping you read the help post and followed the debugging steps before asking for help here - what did you see in the console, no error?
Author
Owner

@savitha958 commented on GitHub (Nov 16, 2021):

we tried window based not consoled based u pls try the code conversion

<!-- gh-comment-id:970029686 --> @savitha958 commented on GitHub (Nov 16, 2021): we tried window based not consoled based u pls try the code conversion
Author
Owner

@savitha958 commented on GitHub (Nov 16, 2021):

filenotfounderror: [errno 2] no such file or directory: 'c:\users\output\sample_easyocr_ui\easyocr\character\en_char.txt'

i got this error because easyocr package was not there that should be added by auto py to exe

i manually paste that package folder now its working

<!-- gh-comment-id:970074960 --> @savitha958 commented on GitHub (Nov 16, 2021): filenotfounderror: [errno 2] no such file or directory: 'c:\\users\\output\\sample_easyocr_ui\\easyocr\\character\\en_char.txt' i got this error because easyocr package was not there that should be added by auto py to exe i manually paste that package folder now its working
Author
Owner

@brentvollebregt commented on GitHub (Nov 17, 2021):

What is trying to access that file? Could you provide the whole stack trace please.

If you add easyocr as a hidden import (if it actually isn't being added) - I probably won't pull these .txt files in with it.

<!-- gh-comment-id:971226039 --> @brentvollebregt commented on GitHub (Nov 17, 2021): What is trying to access that file? Could you provide the whole stack trace please. If you add easyocr as a hidden import (if it actually isn't being added) - I probably won't pull these .txt files in with it.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2022):

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

<!-- gh-comment-id:1014008403 --> @github-actions[bot] commented on GitHub (Jan 17, 2022): This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2022):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:1019385952 --> @github-actions[bot] commented on GitHub (Jan 23, 2022): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#194
No description provided.