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

Maybe a simple answer.. #54

Closed
4 tasks
onobruno opened this issue Sep 6, 2017 · 3 comments
Closed
4 tasks

Maybe a simple answer.. #54

onobruno opened this issue Sep 6, 2017 · 3 comments

Comments

@onobruno
Copy link

onobruno commented Sep 6, 2017

Summary of your issue

  • It is just not working

Environment

Write and check your environment.

What did you do when you faced the problem?

I tried to google it. I did not find anything similar

Example code:

paste your core code

from tabula import read_pdf
df = read_pdf('Fuvest/1.pdf')

Output:

Exception in thread "main" java.lang.UnsupportedClassVersionError: technology/tabula/CommandLineApp : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Traceback (most recent call last):
File "/Users/brunoandradeono/Documents/LiClipse Workspace/Process_imaging/Uni4aDay.py", line 36, in
df = read_pdf('/users/Brunoandradeono/desktop/Fuvest/1.pdf')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tabula/wrapper.py", line 75, in read_pdf
output = subprocess.check_output(args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['java', '-jar', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tabula/tabula-1.0.1-jar-with-dependencies.jar', '--pages', '1', '--guess', '/users/Brunoandradeono/desktop/Fuvest/1.pdf']' returned non-zero exit status 1.

What did you intend to be?

Get all columns without the header and pass to data frame

@chezou chezou closed this as completed Sep 6, 2017
@chezou
Copy link
Owner

chezou commented Sep 6, 2017 via email

@CapitaineNemo
Copy link

Hi, Bro. I have the same issue with same status. How can we fix it? Where is the tabula-java issue page? Thanks.

@CapitaineNemo
Copy link

@onobruno hi bro I find the reason. I use Mac. You can input "java -version" to see which version your Mac actually use. According to the author, this package depends on Java 7 and Java 8. I think your default Java should be Java 1.6 which should be Java 6. So after you install successfully Java 8. Then use "sudo mv /usr/bin/java /usr/bin/java-1.6","sudo ln -s '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java' /usr/bin/java"

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