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

language_check.JavaError: can't find Java #1

Open
ghost opened this issue Mar 22, 2019 · 1 comment
Open

language_check.JavaError: can't find Java #1

ghost opened this issue Mar 22, 2019 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Mar 22, 2019

Traceback (most recent call last):
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init_.py", line 594, in get_server_cmd
cmd = cache['server_cmd']

C:\workplace\IA\ML-fomo>python main.py 'Metallica' 100
Traceback (most recent call last):
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init_.py", line 594, in get_server_cmd
cmd = cache['server_cmd']
KeyError: 'server_cmd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init_.py", line 605, in get_jar_info
java_path, jar_path = cache['jar_info']
KeyError: 'jar_info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 226, in
main()
File "main.py", line 180, in main
api = TwitterAnalyzer()
File "main.py", line 52, in init
self.checkLang = language_check.LanguageTool('en-US')
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init
.py", line 196, in init
self.start_server_on_free_port()
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init
.py", line 333, in _start_server_on_free_port
cls.start_local_server()
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init
.py", line 345, in start_local_server
server_cmd = get_server_cmd(cls.port)
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init
.py", line 596, in get_server_cmd
java_path, jar_path = get_jar_info()
File "C:\Users\f.ksontini\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check_init
.py", line 609, in get_jar_info
raise JavaError("can't find Java")
language_check.JavaError: can't find Java

@tahaHichri
Copy link
Owner

tahaHichri commented Mar 24, 2019

Hello fksontini,
This seems like an issue with Java and Language_check.
Do you happen to hava Java 6 or newer present in your environment?

Java is a prerequisite for language_check
Quoting the doc:

Python 3.3+ (or 2.7)
lib3to2 (if installing for Python 2)
LanguageTool (Java 6.0+)

Please install Java and make sure it is added to your PATH.
Best,

@tahaHichri tahaHichri added wontfix This will not be worked on Dependencies Issue good first issue Good for newcomers and removed wontfix This will not be worked on Dependencies Issue labels Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant