Comments (13)
Can you try your minimal example with --include-package-data on the package that contains the data file?
from nuitka.
Thank you very much for your feedback! With --include-package-data=easyocr it worked.
Do you know why my MacBook Pro (13-inch, M1, 2020, Chip Apple M1, Memory 16 GB, macOS Sonoma 14.2.1) takes 42 seconds to launch the program?
Is there a rule for which packages the -include-package-data statement is necessary?
The main program that I aim to compile is generating an error. This error doesn't occur when running the Python interpreter. Before sharing the details here, I need to conduct a thorough analysis of the circumstances in which the error arises.
from nuitka.
After Kay Hayen helped me to solve the first problem, I encountered another issue. As stated before, I encountered an error message when I compiled my main program with Nuitka. I pinpointed the problem using this simplified and concise Python script:
import easyocr
import imageio.v2 as imageio
reader = easyocr.Reader(['de'])
panel = imageio.imread("panel.jpg")
extracted_text_list = reader.readtext(panel, detail=0, paragraph=True, y_ths=-0.05)
print(extracted_text_list)
In Python, this script successfully prints the extracted list of text. However, when I translated the program using Nuitka on my Mac, I received the following error message:
extracted_text_list = reader.readtext(panel, detail=0, paragraph=True, y_ths=-0.05)
File "/private/var/folders/97/2hhk78996sl6dtlhx5wrhl4m0000gp/T/onefile_90454_1706025419_107628/easyocr/easyocr.py", line 454, in readtext
File "/private/var/folders/97/2hhk78996sl6dtlhx5wrhl4m0000gp/T/onefile_90454_1706025419_107628/easyocr/utils.py", line 767, in reformat_input
ValueError: Invalid input type. Supporting format = string(file path or url), bytes, numpy array
The behavior differs significantly from the original Python program. Can someone explain why this discrepancy occurs in the Nuitka version?
I am aware that an alternative solution is to use:
extracted_text_list = reader.readtext("panel.jpg", detail=0, paragraph=True, y_ths=-0.05)
However, due to performance considerations and the fact that the jpg file is generated in memory, I prefer not to save it to disk.
from nuitka.
Yes, @KevinRodriguez777 is on this in another issue already, I wasn't immediately sure of that, maybe share the issue number here, I had no easy finding for it
from nuitka.
Can you please clarify whether @KevinRodriguez777 is actively working on addressing the reported issue or if there is another separate issue related to the same topic? The addition of the "duplicate" label suggests the presence of a similar problem, but I couldn't locate the corresponding duplicate issue.
from nuitka.
Can you please clarify whether @KevinRodriguez777 is actively working on addressing the reported issue or if there is another separate issue related to the same topic? The addition of the "duplicate" label suggests the presence of a similar problem, but I couldn't locate the corresponding duplicate issue.
It’s been worked on. I will do a PR either later today or tomorrow morning.
from nuitka.
@kayhayen i believe you're confusing it with #2619 which is for paddleOCR, they're separate libraries.
from nuitka.
I see, pardon my mistake, this is now on develop and will be in 2.0 shortly.
from nuitka.
This is part of the stable release 2.0 that I just made.
from nuitka.
Thank you very much Kay! With the stable release 2.0 it worked. This is really great!
I will not check whether the main program works.
On my Mac this simple program takes 42 seconds to load. Is this normal behaviour?
from nuitka.
I don't think that is normal, usually it takes 42 hours.
from nuitka.
Thanks for the joke. Honestly, I want to know whether anything is wrong on my side. The program is 200 MB in size and takes so long to load. The program takes five seconds to launch when using Python. I am not sure whether my Mac checks the file for not being malware every time I call it. Maybe it is not a question that I should ask here.
I appreciated your prompt assistance with my easyocr matter very much and was delighted to receive such swift help.
I have another concern related to adding a picture to my Mac. Should I initiate a new thread for this topic, or can I pose my straightforward question here?
from nuitka.
App bundles should launch immediately as they do not have unpacking. Create a new issue for slow startup, but please try and isolate it on your side, like with a print at program start before any import, etc. and running the app from the console so you see the output. For "picture", yes new issue, always new issue, only one topic per issue is how to make sure nothing gets lost.
from nuitka.
Related Issues (20)
- Windows. Failed build on the mounted network disk. HOT 5
- Compiled xgboost does not do proper resource cleanup HOT 3
- Solved. Windows, local directory and system package confusion. HOT 2
- Using wrong gcc (not winlibs) is not detected on Windows HOT 28
- Nuitka Multidist option not working HOT 1
- Are these libraries supported? HOT 2
- Support Zig as backend C compiler HOT 2
- (tracking issue) Most important Zig issues affecting Nuitka HOT 2
- pdfium library not included in standalone when using pypdfium2 HOT 6
- ValueError: invalid literal for int() with base 10: '=4' HOT 4
- Unable to obtain driver from chrome using Selenium Manager when onefile and standalone HOT 12
- error while compiling selenium chromedriver or something?? check it on picture HOT 3
- Check for required system packages (e.g. tkinter) at the start of the build process HOT 5
- tensorflow: 'NoneType' object has no attribute 'pick_unused_port' HOT 3
- Support for hydra needs to be added HOT 19
- [Shapely]Shapely ImportError after compile and run HOT 1
- python program using cherrypy, doesn´t work HOT 3
- Is there a list of software packaged with Nuitka? HOT 2
- Mac zig build using “Apple” in target HOT 2
- Bootstrap triggers virus total on signed executable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuitka.