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

An error occured <class 'src.tesseract.TesseractError.TesseractError'> #29

Closed
Capsdual opened this issue Jul 4, 2022 · 10 comments
Closed

Comments

@Capsdual
Copy link

Capsdual commented Jul 4, 2022

Input video location:  inputs
Frame location:  frames
Autosaving Charms:  True
Skipping frame extraction:  False
Deleting existing frames:  True
Extracting Frames
Total input files to scan: 8

Reduced frames from 394 to 434
Extracting charms from frames
Using bundled tesseract
Expected Tesseract location C:\Users\PWRWa\AppData\Local\Temp\_MEI137402\Tesseract-OCR\libtesseract-5.dll
Language pack was found
An error occured <class 'src.tesseract.TesseractError.TesseractError'>

Tried everything with installing Tesseract, adding a path, reinstalling, rebooting, admin mode, not sure what to do and I'm at a loss. Noticed there was another post for this same error, but that was a few months ago. When looking at the temp folder, Tesseract-OCR is not anywhere to be found.

Using the most recent version and Windows 11.

@chpoit
Copy link
Owner

chpoit commented Jul 4, 2022

There should be an "app.log" file near the executable, could you upload that?

I don't have a Windows 11 install, I'll try setting up one by next weekend, until then could you try on a windows 10 computer just in case? I find it odd that it "increases" the amount of frames so if you could upload your clips to github too it would help.

Thanks

EDIT: the previous tesseract issue was tied to github changing where they stored data and the download URL being broken.

@lbbboy
Copy link

lbbboy commented Jul 4, 2022

Input video location: inputs

Frame location: frames
Autosaving Charms: True
Skipping frame extraction: False
Deleting existing frames: True
Extracting Frames
Total input files to scan: 8
Reduced frames from 394 to 434 Extracting charms from frames Using bundled tesseract Expected Tesseract location C:\Users\PWRWa\AppData\Local\Temp_MEI137402\Tesseract-OCR\libtesseract-5.dll Language pack was found An error occured <class 'src.tesseract.TesseractError.TesseractError'>

Tried everything with installing Tesseract, adding a path, reinstalling, rebooting, admin mode, not sure what to do and I'm at a loss. Noticed there was another post for this same error, but that was a few months ago. When looking at the temp folder, Tesseract-OCR is not anywhere to be found.

Using the most recent version and Windows 11.

Input video location: inputs
Frame location: frames
Autosaving Charms: True
Skipping frame extraction: False
Deleting existing frames: True
Extracting Frames
Total input files to scan: 1

Reduced frames from 506 to 49
Extracting charms from frames
An error occured <class 'KeyError'>

save Editor Export would not be more convenient

@chpoit
Copy link
Owner

chpoit commented Jul 4, 2022

Are you on Windows 11 too @lbbboy ? from what you posted you might have a different issue from the OP, I don't see a mention of tesseract in what you posted.

@Capsdual
Copy link
Author

Capsdual commented Jul 4, 2022

I actually do not have an app.log file, should of mentioned. Tried looking everywhere before but can't find it. Just to verify, will this be in the folder for where the exe is located in, or the folders located in Local/utsushis-char? It's not in either. Only things I have in my folder after running the program are the folders Frames / Inputs and the .exe utsushis-charm.exe.

I could give Windows 10 a try sometime.

I have uploaded the clips. https://drive.google.com/file/d/1eZZQ8zXvObBtOsImg02tLZmygavWJtAV/view?usp=sharing

EDIT: Fixed the url

@chpoit
Copy link
Owner

chpoit commented Jul 4, 2022

I actually do not have an app.log file, should of mentioned. Tried looking everywhere before but can't find it. Just to verify, will this be in the folder for where the exe is located in, or the folders located in Local/utsushis-char? It's not in either. Only things I have in my folder after running the program are the folders Frames / Inputs and the .exe utsushis-charm.exe.

Yes, it should be besides the utsushis-charm.exe.

For it to not be there is quite odd, I'll look into what could cause the logs to not be created, thanks a lot for the clips, it should help. It might be cause by there being a "crash" and me not creating it properly.
I'll try pushing a temporary version of the app before debugging W11 that checks for the local install of tesseract if the bundled one isn't found, W11 might do some weird stuff with files.

@chpoit
Copy link
Owner

chpoit commented Jul 4, 2022

charms.encoded.txt
@Capsdual I just ran your clips on my (linux) computer and extracted your charms, so here you go

BTW, you can go waaaaaaaaaaaaaaaay faster than that when you record, 300 charms can easily fit in ~2 clips.

No time to fix the underlying issue right now however.

@Capsdual
Copy link
Author

Capsdual commented Jul 4, 2022

Thanks for the help, really appreciate it! Also, I was going a bit slower in those clips I sent you because when I was originally having issues, I just wanted to make sure if it was cause I wasn't going too fast or something as this is my first time using the software, so I made that 2nd batch but ended up having the same issue.

Also no worries, take your time on it!

@chpoit
Copy link
Owner

chpoit commented Jul 5, 2022

@Capsdual when you have time, please try the new version

@chpoit chpoit closed this as completed Jul 5, 2022
@Capsdual
Copy link
Author

Capsdual commented Jul 5, 2022

I went ahead and tried the new version, and I am getting a new error now. I am also able to see the app.log file now after using this new version. 1st is error in the program, 2nd is error in the app.log .

Input video location:  inputs
Frame location:  frames
Autosaving Charms:  True
Skipping frame extraction:  True
Deleting existing frames:  False
Extracting charms from frames
Checking for bundled tesseract
Tesseract: C:\Users\PWRWa\AppData\Local\Temp\_MEI68002\libtesseract-5.dll
Language pack was found
An error occured <class 'src.tesseract.TesseractError.TesseractError'> <traceback object at 0x00000211F8D88D80>
src.__main__ - ERROR - An error occured <class 'src.tesseract.TesseractError.TesseractError'>, initialization failed (-1), <traceback object at 0x00000211F8D88D80>
src.__main__ - ERROR - An error occured
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1921, in __call__
  File "src\ui\MainWindow.py", line 345, in run
  File "src\ui\MainWindow.py", line 322, in run
  File "src\charm_extraction.py", line 221, in extract_charms
  File "src\tesseract\Tesseract.py", line 86, in __init__
src.tesseract.TesseractError.TesseractError: initialization failed (-1)

@chpoit
Copy link
Owner

chpoit commented Jul 5, 2022

I went ahead and created a new issue for this #32

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

3 participants