Cygwin and Tesseract : how generate train file on windows - cygwin

I'm totaly new with Cygwin (and tesseract). I'm trying to create a train file. I follow this tutorial.
I've create a jpg file and try to execute this command :
Portekoi#PortekoiOrdi /cygdrive/d/_devs/tesseract-ocr
$ /cygdrive/d/_devs/tesseract-OCR/tesseract.exe /cygdrive/d/_Devs/Tesseract-OCR/imgTrain/fra.plaque.exp0.jpg /cygdrive/d/_devs/tesseract-OCR/imgTrain/fra.plaque.exp0 /cygdrive/d/_Devs/Tesseract-OCR/tessdata/tessconfigs/batch.nochop makebox
read_params_file: Can't open /cygdrive/d/_Devs/Tesseract-OCR/tessdata/tessconfigs/batch.nochop
Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
Error in fopenReadStream: file not found
Error in findFileFormat: image file not found
Error during processing.
ObjectCache(011FAAC8)::~ObjectCache(): WARNING! LEAK! object 05C6FF48 still has count 1 (id D:\_Devs\Tesseract-OCR/tessdata/eng.traineddatapunc-dawg)
ObjectCache(011FAAC8)::~ObjectCache(): WARNING! LEAK! object 05836638 still has count 1 (id D:\_Devs\Tesseract-OCR/tessdata/eng.traineddataword-dawg)
ObjectCache(011FAAC8)::~ObjectCache(): WARNING! LEAK! object 058366C8 still has count 1 (id D:\_Devs\Tesseract-OCR/tessdata/eng.traineddatanumber-dawg)
ObjectCache(011FAAC8)::~ObjectCache(): WARNING! LEAK! object 061BB088 still has count 1 (id D:\_Devs\Tesseract-OCR/tessdata/eng.traineddatabigram-dawg)
ObjectCache(011FAAC8)::~ObjectCache(): WARNING! LEAK! object 061BB880 still has count 1 (id D:\_Devs\Tesseract-OCR/tessdata/eng.traineddatafreq-dawg)
But batch.nochop is not found (but existing in the good path : D:\_Devs\Tesseract-OCR\tessdata\tessconfigs )
How can I resolve this error?
With Cygwin, why I have to specfiy full path (I've add good path on environment variables)

Related

CentOS | error apache spark file already exists Sparkcontext

I am unable to write to the file which I create. In windows it's working fine. In centos it says file already exists and does not write anything.
File tempFile= new File("temp/tempfile.parquet");
tempFile.createNewFile();
parquetDataSet.write().parquet(tempFile.getAbsolutePath());
Following is the error: file already exists
2020-02-29 07:01:18.007 ERROR 1 --- [nio-8090-exec-1] c.gehc.odp.util.JsonToParquetConverter : Stack Trace: {}org.apache.spark.sql.AnalysisException: path file:/temp/myfile.parquet already exists.;
2020-02-29 07:01:18.007 ERROR 1 --- [nio-8090-exec-1] c.gehc.odp.util.JsonToParquetConverter : sparkcontext close
The default savemode in spark is ErrorIfExists. This means that if the file with the same filename you intend to write already exists, it will give an exception similar to the one you got above. This is happening in your case because you are creating the file yourself rather than leaving that task to spark. There are 2 ways in which you can resolve the situation:
1) You can either mention savemode as "overwrite" or "append" in the write command:
parquetDataSet.write.mode("overwrite").parquet(tempFile.getAbsolutePath());
2) Or, you can simply remove the create new file command and straightaway pass the destination path in your spark write command as follows:
parquetDataSet.write.parquet("temp/tempfile.parquet");

How to put an extra file in the kernel image by yocto

I have a trouble of putting my initramfs.cpio in my kernel image by yocto.
I have two bb files, one is used to build an initramfs, and the other one is used to build a fitimage.
I successful to build the fitimage bundled with my initramfs image.
But it always failed to build a fitImage that has an initramfs.cpio.gz in the /usr directory in the fitImage.
( I mean, I want to see a file named initramfs.cpio in the /usr when I use my fitImage booting to console )
====================================================================
Here are my error message..
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: QA Issue: linux-mine: Files/directories were installed but not shipped in any package:
/usr
/usr/initramfs-mine-qemu.cpio
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
linux-mine: 2 installed and not shipped files. [installed-vs-shipped]
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: Fatal QA errors found, failing task.
ERROR: linux-mine-1_4.9.27+gitAUTOINC+d87116e608-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/paul/projects/Test/yocto/build/tmp/work/mine-poky-linux-gnueabi/linux-mine/1_4.9.27+gitAUTOINC+d87116e608-r0/temp/log.do_package.26149
ERROR: Task (/home/paul/projects/Test/yocto/yocto-2.2/poky/../meta-mine/recipes-kernel/linux/linux-mine_4.9.bb:do_package) failed with exit code '1'
====================================================================
Here is my kernel image bb file
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "4.9.27"
SRCREV = "d87116e608e94ad684b5e94d46c892e33b9e2d78"
SRC_URI = "git://local/kernel;protocol=ssh;branch=master"
#FILES_${PN} += "/usr /usr/initramfs-mine-${MACHINE_ARCH}.cpio"
#FILES_${PN}-${PV} += "/usr /usr/initramfs-mine-${MACHINE_ARCH}.cpio"
#IMAGE_INSTALL = "initramfs-mine"
do_install_append () {
echo "WangPaul : S=[${S}]"
echo "WangPaul : B=[${B}]"
echo "WangPaul : D=[${D}]"
install -d ${D}/usr/
install -m 0444 ${B}/usr/initramfs-mine-${MACHINE_ARCH}.cpio ${D}/usr/
}
====================================================================
Here is my initramfs bb file
LICENSE = "GPLv2"
PACKAGE_INSTALL = "initramfs-live-boot ${VIRTUAL-RUNTIME_base-utils} udev ${ROOTFS_BOOTSTRAP_INSTALL}"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
====================================================================
I have found similar questions:
Ship extra files in kernel module recipe and
An example of using FILES_${PN}
The way in aboves discussion are not work...
Any information would be appreciate !!
Thanks !!
The error seems to QA issues it means the source is compiled but not adding to rootfs. Add below line to yourkernel-image.bb. it will solve the issue.
FILES_${PN} += "${exec_prefix}/*"
Note: may be In your kernel.bb file you have given wrong format

Win10: ASDF can't load system (ASDF_OUTPUT_TRANSLATION error)

Update 2
I think #faré is right, it's an output translation problem.
So I declared the evironment variable ASDF_OUTPUT_TRANSLATIONS and set it to E:/. Now (asdf:require-system "my-system") yields a different error: Uneven number of components in source to destination mapping: "E:/" which led me to this SO-topic.
Unfortunately, his solution doesn't work for me. So I tried the other answer and set ASDF_OUTPUT_TRANSLATIONS to (:output-translations (t "E:/")). Now I get yet another error:
Invalid source registry (:OUTPUT-TRANSLATIONS (T "E:/")).
One and only one of
:INHERIT-CONFIGURATION or
:IGNORE-INHERITED-CONFIGURATION
is required.
(will be skipped)
Original Posting
I have a simple system definition but can't get ASDF to load it.
(asdf-version 3.1.5, sbcl 1.3.12 (upgraded to 1.3.18 AMD64), slime 2.19, Windows 10)
What I have tried so far
Following the ASDF manual: "4.1 Configuring ASDF to find your systems"
There it says:
For Windows users, and starting with ASDF 3.1.5, start from your
%LOCALAPPDATA%, which is usually ~/AppData/Local/ (but you can ask in
a CMD.EXE terminal echo %LOCALAPPDATA% to make sure) and underneath
create a subpath config/common-lisp/source-registry.conf.d/
That's exactly what I did:
Echoing %LOCALAPPDATA% which evaluates to C:\Users\my-username\AppData\Local
Underneath I created the subfolders config\common-lisp\source-registry.conf.d\ (In total: C:\Users\my-username\AppData\Local\config\common-lisp\source-registry.conf.d\
The manual continues:
there create a file with any name of your choice but with the type conf, for instance 50-luser-lisp.conf; in this file, add the following line to tell ASDF to recursively scan all the subdirectories under /home/luser/lisp/ for .asd files: (:tree "/home/luser/lisp/")
That’s enough. You may replace /home/luser/lisp/ by wherever you want to install your source code.
In the source-registry.conf.d folder I created the file my.conf and put in it (:tree "C:/Users/my-username/my-systems/"). This folder contains a my-system.asd.
And here comes the weird part:
If I now type (asdf:require-system "my-system") in the REPL I get the following error:
Can't create directory C:\Users\my-username\AppData\Local\common-lisp\sbcl-1.3.12-win-x86\C\Users\my-username\my-systems\C:\
So the problem is not that ASDF doesn't find the file, it does -- but (whatever the reason) it tries to create a really weird subfolder hierarchy which ultimately fails because at the end it tries to create the folder C: but Windows doesn't allow foldernames containing a colon.
Another approach: (push path asdf:*central-registry*)
If I try
> (push #P"C:/Users/my-username/my-systems/" asdf:*central-registry*)
(#P"C:/Users/my-username/my-systems/"
#P"C:/Users/my-username/AppData/Roaming/quicklisp/quicklisp/")
> (asdf:require-system "my-system")
I get the exact same error.
I don't know what to do.
Update
Because of the nature of the weird path ASDF was trying to create I thought maybe I could bypass the problem by specifying a relative path instead of an absolute one.
So I tried
  (:tree "\\Users\\my-username\\my-systems")
in my conf file. Still the same error.
Ahem. It looks like an output-translations problem.
I don't have a Windows machine right now, but this all used to work last time I tried.
Can you setup some ad hoc output-translations for now that will make it work?

cannot open shared object file : No such file or directory

I installed postgresql-9.3 in linux server 7.1 redhat & postgis93-2.1.8
after that i created New Database and executed the Query in Query Window
"Create extension postgis"
it showing error like below
ERROR: could not load library "/opt/Postgresql/9.3/lib/postgresql/rtpostgis-2.1.so":libpng12.so.0:cannot open shared object file : No such file or directory sql state 58p01
I installed backage libpng12.so.0 correctly
file in the location og /usr/lib/
Kindly let me know where i am wrong

MATLAB MCC "??? Error Using ==> mcc, return status = 1"

I'm trying to compile a matlab .m file on a linux cluster using mcc. R2008b is installed on the cluster.
I am using http://www.it.northwestern.edu/research/sscc/matlabcompiler.html as a guide.
My plusone.m file is as follows:
function y = plusone(x)
if(ischar(x)), x = str2num(x), end;
y = x + 1;
I am running matlab on the cluster using the command "matlab -nodisplay".
I have run mbuild -setup and have added (my matlab root folder)/bin and /sbin to $PATH.
I am using the command mcc -m -v plusone.m from within MATLAB, and the full output is:
"??? Error using ==> mcc Error executing mcc, return status = 1."
This output is the same for a few different .m files and a number of different flag settings.
Without more error information, I'm a bit stumped. Suggestions about what might be causing the error or ways of getting more information about the error would be greatly appreciated.

Resources