You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i create coreldraw docker addon, I need to make an addon that translates the image into text and checks for errors. and i try tesseract for translate picture into text. but visual studio throws Tesseract.TesseractException: "Failed to initialise tesseract engine.. See https://github.com/charlesw/tesseract/wiki/Error-1 for details.". throws an error despite the fact that I have tessdata. I have no idea what is wrong. crash on ReadText(object sender, RoutedEventArgs e)
`using Corel.Interop.VGCore;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tesseract;
using corel = Corel.Interop.VGCore;
namespace AiScanner
{
public partial class DockerUI : UserControl
{
private corel.Application corelApp;
private Styles.StylesController stylesController;
string fileUrl;
MemoryStream lastPicture;
public DockerUI(object app)
{
InitializeComponent();
try
{
this.corelApp = app as corel.Application;
stylesController = new Styles.StylesController(this.Resources, this.corelApp);
fileUrl = corelApp.UserWorkspacePath + "AiScanner.bmp";
}
catch
{
global::System.Windows.MessageBox.Show("VGCore Erro");
}
I have a similar issue. At first the example project (https://github.com/charlesw/tesseract-samples) ran fine, but after adding german language training data to the ./tessdata folder and using that instead of the english one (by replacing the "eng" in line 18 with "deu") , I get the following error (ConsoleDemo) :
Error opening data file ./tessdata/deu.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'deu' Tesseract couldn't load any languages! Unexpected Error: Failed to initialise tesseract engine.. See https://github.com/charlesw/tesseract/wiki/Error-1 for details. Details: Tesseract.TesseractException: Failed to initialise tesseract engine.. See https://github.com/charlesw/tesseract/wiki/Error-1 for details. at Tesseract.TesseractEngine.Initialise(String datapath, String language, EngineMode engineMode, IEnumerable`1 configFiles, IDictionary`2 initialValues, Boolean setOnlyNonDebugVariables) at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerable`1 configFiles, IDictionary`2 initialOptions, Boolean setOnlyNonDebugVariables) at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode) at Tesseract.ConsoleDemo.Program.Main(String[] args) in [ReposPath]\tesseract-samples\src\Tesseract.ConsoleDemo\Program.cs:line 19
I downloaded the Language form the linked repository, where it also says it was made for Tesseract 4 so there should not be any version issues.
Edit: found the issue, I did not set the german language file to copy on build (in VS right klick --> properties). Leaving this comment in cas any one else runs into the same issue.
i create coreldraw docker addon, I need to make an addon that translates the image into text and checks for errors. and i try tesseract for translate picture into text. but visual studio throws Tesseract.TesseractException: "Failed to initialise tesseract engine.. See https://github.com/charlesw/tesseract/wiki/Error-1 for details.". throws an error despite the fact that I have tessdata. I have no idea what is wrong. crash on
ReadText(object sender, RoutedEventArgs e)
`using Corel.Interop.VGCore;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tesseract;
using corel = Corel.Interop.VGCore;
namespace AiScanner
{
public partial class DockerUI : UserControl
{
private corel.Application corelApp;
private Styles.StylesController stylesController;
string fileUrl;
MemoryStream lastPicture;
public DockerUI(object app)
{
InitializeComponent();
try
{
this.corelApp = app as corel.Application;
stylesController = new Styles.StylesController(this.Resources, this.corelApp);
fileUrl = corelApp.UserWorkspacePath + "AiScanner.bmp";
}
catch
{
global::System.Windows.MessageBox.Show("VGCore Erro");
}
}
`
The text was updated successfully, but these errors were encountered: