mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 19:55:49 +03:00
[GH-ISSUE #212] auto-py-to-exe is not including the EASYOCR package after converting python file to exe #194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@brentvollebregt commented on GitHub (Nov 15, 2021):
If you follow the debugging section of my help post, are you getting any errors?
@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:
@savitha958 commented on GitHub (Nov 16, 2021):
Correction in my mail
On Tue, Nov 16, 2021, 8:49 AM Savitha S @.***> wrote:
@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.@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)
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()
@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?
@savitha958 commented on GitHub (Nov 16, 2021):
we tried window based not consoled based u pls try the code conversion
@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
@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.
@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.
@github-actions[bot] commented on GitHub (Jan 23, 2022):
Closing issue due to no activity in more than 60 days.