-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error No such file or directory-Errno::ENOENT #14
Comments
it sounds like you've already pretty much identified the problem. Henkei is looking in the path specified by the If it helps, this is how Henkei is building the path to the Java bin:
|
Thanks for the suggestion. I understand that the issue is related to Java_home and i have been trying several ways to isolate the problem but i am going nowhere. I have done the following.
'C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - C:\Program Files (x86)\Java\jre1.8.0_251**\bin\java** ---------- (Errno::ENOENT)'
JRE VERSION: 1.8 JavaHome: C:\Program Files (x86)\Java\jre1.8.0_251'
|
Not sure I can add much. I'd suggest trying to replicate the error from a Windows shell. ie what happens if you execute the command:
(of course replace |
Also I noticed you're referencing two different paths. The one in your original post was the JDK but your second post referenced the JRE. Would be worth double checking there isn't an issue there? |
Ran this in the command prompt and received nothing except one blank command prompt |
Not sure I follow what you mean regarding what you actually ran? You've only pasted some quote characters. I'm by no means a Java expert, but you should only need the JRE to run |
As suggested by you, I executed this statement and got the following in the command prompt 'Error: Could not find or load main class .awt.headless=true' Pl suggest. |
Also tried executing the command from the directory containing the Java binary |
Sorry @Jasmeet2011 I can't help you. This issue seems to be related to your system install of Java and not Henkei. |
Hi, I finally manged to install Java in a different path and could start working. I can now read a text file but docx, xlsx and pdf throw an error |
From the stack trace I can see all of this is coming from Apache Tika (the library Henkei calls to for extracting the contents etc). Searching the web for the error shows up this (long running) issue on the Tika issue tracker. https://issues.apache.org/jira/browse/TIKA-2407 If you have a read through the stack trace it's also telling you the problem:
ie.. corrupted zip file. DOCX, XLSX formats are simply a bunch of XML files stored in a ZIP file which would explain why you're seeing errors about ZIP files.. Unfortunately this issue comes down to the files you're feeding into it. If they're corrupted it's unlikely Tika will be able to read them! If you believe the files are not corrupted then I'd suggest you raise an issue with the Tika project and see if they might be able to help you. |
ok, thanks |
Apparently this error is not a Tika issue as i managed to extract the content of the document using this command line.
and get this error
|
I tried streaming a file from web |
FYI I believe the root of this issue has been fixed by #19 Can you please try update to the latest release and let me know if the problem persists |
Wanted to comment and say that I also get the same error attempting to read a file in Windows 10 using henkei 1.27.1. The same code works perfectly on my mac machine. But on Windows, the following: require 'henkei'
data = File.read '/Users/me/Documents/original.docx'
office_properties = Henkei.read :metadata, data results in:
|
Hi @cyndilopez the error you've posted looks very different to the original error. The original error for this issue related to a Java path issue. Yours appears to be about a corrupted DOCX file. Can you please create a separate issue for this. |
oops my bad, I thought you were trying to fix the error that popped up for the OP on June 17, 2020. I don't think the docx files are corrupted b/c on my mac machine the same exact files are used with the same code and it works perfectly fine - but on my virtual machine running Windows 10, it keeps running into the error posted above. |
HI, I am trying to read a word document but i keep getting the error below. I am using Windows 10 and
'echo %JAVA_HOME%' gives this
'C:\Program Files\Java\jdk1.8.0_191'
'C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:213:in
'spawn': No such file or directory - C:\Program Files\Java\jdk1.8.0_191/bin/java -Djava.awt.headless=true -jar C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/jar/tika-app-1.23.jar --config=C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/jar/tika-config.xml -t (Errno::ENOENT) from C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:213:in
popen_run'from C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:159:in
popen2' from C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:342:in
capture2'from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/lib/henkei.rb:229:in
client_read' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/lib/henkei.rb:33:in
read'from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/lib/henkei.rb:81:in
text' from -:3:in
If i go to command prompt and run
'java -Djava.awt.headless=true -jar C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/jar/tika-app-1.23.jar --config=C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/henkei-1.23.1/jar/tika-config.xml -t'
There is no error.
Can you pl guide.
The text was updated successfully, but these errors were encountered: