jonathanpalma / react-native-tesseract-ocr

Tesseract OCR wrapper for React Native
MIT License
558 stars 172 forks source link

getting "java.io.IOException: Could not create directory" error #151

Closed wadekar9 closed 1 year ago

wadekar9 commented 1 year ago

getting "java.io.IOException: Could not create directory" error after emitting TesseractOcr.recognize() event. please check out the mentioned below code for more info.

Dependencies (please complete the following information):

Code :

import TesseractOcr, { LANG_ENGLISH, LEVEL_WORD } from 'react-native-tesseract-ocr';

const tesseractOptions = { level : LEVEL_WORD }; try {

const recognizedText = await TesseractOcr.recognize(
  "file:///data/user/0/com.mill/cache/react-native-image-crop-picker/images.jpeg",
  LANG_ENGLISH,
  tesseractOptions,
);
console.log(recognizedText);

} catch (err) { console.error(err.message); }

Screenshot 2023-03-04 at 6 45 24 PM
demon3z commented 1 year ago

This problem appeared on my side. I found out that it was a problem with my Android 11 version. I need to obtain the permissions of all files, and I solve it after obtaining it.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.