Closed ShahadAlkhalifa closed 1 year ago
post the whole log, and all steps to reproduce the problem.
This is the whole log:
unicharset_extractor --output_unicharset "data/namaq/unicharset" --norm_mode 2 "data/namaq/all-gt" Failed to read data from: data/namaq/all-gt Wrote unicharset file data/namaq/unicharset python3 shuffle.py 0 "data/namaq/all-lstmf" Traceback (most recent call last): File "/Users/shahadalkhalifa/tesstrain/shuffle.py", line 24, in <module> fd0 = open(sys.argv[2], 'r') FileNotFoundError: [Errno 2] No such file or directory: 'data/namaq/all-lstmf' make: *** [data/namaq/all-lstmf] Error 1
Note: I named my model "namaq" and both all-gt
and all-lstmf
folders were not created in my model's directory
Sorry but that is not the whole log: all-lstmf does not exist because of an error from previous commands.
Sorry but that is not the whole log: all-lstmf does not exist because of an error from previous commands.
After the command make tesseract-langdata
I ran make training MODEL_NAME=namaq
command and the following is the output in the terminal:
tesseract "data/namaq-ground-truth/img84.png" data/namaq-ground-truth/img84 --psm 13 lstm.train
python3 shuffle.py 0 "data/namaq/all-lstmf" Traceback (most recent call last): File "/Users/shahadalkhalifa/tesstrain/shuffle.py", line 24, in <module> fd0 = open(sys.argv[2], 'r') FileNotFoundError: [Errno 2] No such file or directory: 'data/namaq/all-lstmf' (base) shahadalkhalifa@Shahads-MacBook-Pro-2 tesstrain %
Please note that this is only part of the output since I'm training it on a large amount of files and more box and lstmf files were created
I am having the same problem.
I put all .gt.txt, png files in hwmodel-ground-truth dir. then run make training MODEL_NAME=hwmodel command. it generated .box file in hwmodel-ground-truth dir. Then error:
python3 shuffle.py 0 "data/hwmodel/all-lstmf"
Traceback (most recent call last):
File "shuffle.py", line 24, in
@zdenop It seems like a bug because the folders were not created. I tried creating them manually and ran make training MODEL_NAME=namq
again and got the following output:
unicharset_extractor --output_unicharset "data/namaq/unicharset" --norm_mode 2 "data/namaq/all-gt" Failed to read data from: data/namaq/all-gt Wrote unicharset file data/namaq/unicharset wc: stdin: read: Is a directory
Parse error: bad token
all-lstmf
is not a folder but a file. Do not try to fix something you do not understand.
I wrote provide all steps to reproduce the problem
- you just picking some commands that fail (of course) because you ignored previous errors. If you are really interested in support follow the instructions.
I've been having a long time problem with the same issue. The cause of the problem was simple. The version of make is old
$ make --version
GNU Make 3.81
all-lstmf
and all-gt
files cannot be generated in this version.
Upgrade make. For Mac brew install make
$ make --version
GNU Make 4.4
$ make training
### for mac
$ gmake --version
GNU Make 4.4
$ gmake training
Now there is no error.
@zipizigi Yes this exactly solved the error! Thank you very much :)
Now I have this error when run gmake leptonica tesseract. any suggestions? thanks
inflating: tesseract-5.3.0/unittest/validator_test.cc
cd tesseract-5.3.0 && \
sh autogen.sh && \
PKG_CONFIG_PATH="/Volumes/fast/git/tesstrain/usr/lib/pkgconfig" \
./configure --prefix=/Volumes/fast/git/tesstrain/usr && \
LDFLAGS="-L/Volumes/fast/git/tesstrain/usr/lib"\
make -j4 install && \
LDFLAGS="-L/Volumes/fast/git/tesstrain/usr/lib"\
make -j4 training-install && \
date > "tesseract.built"
Running aclocal
Running /opt/local/bin/glibtoolize
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
glibtoolize: copying file 'config/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
Running aclocal
Running autoconf
Missing pkg-config. Check the build requirements.
Something went wrong, bailing out!
gmake: *** [Makefile:383: tesseract.built] Error 1
@zipizigi : can you please provide full logs for training with make 3.81 and 4.4? e.g.:
unzip -qq -d data/foo-ground-truth ocrd-testset.zip
make training 2>&1 | tee training.log
@zdenop: in the autogen.sh script:
if grep -q PKG_CHECK_MODULES configure; then
rm configure echo "Missing pkg-config. Check the build requirements." bail_out fi
do you know where is PKG_CHECK_MODULES defined? I installed pkg-config: tesseract % pkg-config --version 0.29.2
how can I fix this problem: Missing pkg-config. Check the build requirements.
Something went wrong, bailing out!
gmake: *** [Makefile:383: tesseract.built] Error 1
thanks
@z160896 : please stop with this! First of all - Stick to the original topic. One problem = one issue. Next: Issue tracker for solving bugs/errors in code. Use tesseract user forum for asking support.
I’m using tesseract to train it on my data. However, I'm receiving this error after running
make training MODEL_NAME=name-of-the-resulting-model
. It seems that it's failing to createall-lstmf
andall-gt
files. Even though, it successfully created the.box
and.lstmf
files in my data. How can I resolve this issue? Thanks.