Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Error Attempting to read Image #978

Open
Allen1801 opened this issue Dec 20, 2024 · 3 comments
Open

Error: Error Attempting to read Image #978

Allen1801 opened this issue Dec 20, 2024 · 3 comments

Comments

@Allen1801
Copy link

So, I am creating a TauriV2 + Leptos project that involves tesseract.js CDN. I can successfully upload and read the image inside the project folder but the issue is when I read an image outside the project folder, I get an error saying (Error: Error attempting to read image.")

I want to know if it is possible for tesseract.js to access images outside the project folder

image

@Balearica
Copy link
Member

Can you confirm whether you are able to access these files in another library/function (not Tesseract.js)? If not, then I think this is a Tauri question rather than a Tesseract.js question. Frameworks for building desktop applications such as Electron and Tauri do limit what filesystem-related features are enabled by default for security reasons. Current best practices for accepting input files should be discussed somewhere in the documentation for those programs.

@Allen1801
Copy link
Author

Yes, I can access these files using the tesseract library, but I opted to use a cdn because I need to use the app on mobile

@Balearica
Copy link
Member

Yes, I can access these files using the tesseract library, but I opted to use a cdn because I need to use the app on mobile

It is unclear to me what this means. Are you claiming that the browser version of Tesseract.js works if you host all of the files locally but does not work when the Tesseract.js files are hosted on a CDN?

If you want assistance, the best thing you can do is create a minimal reproducible example that can be cloned and easily run to reproduce the issue. Without that, all we can do is guess as to what is going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants