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

Error: Could not find or load main class Py4JServer #6

Open
ghadisaurabh opened this issue Feb 8, 2018 · 9 comments
Open

Error: Could not find or load main class Py4JServer #6

ghadisaurabh opened this issue Feb 8, 2018 · 9 comments

Comments

@ghadisaurabh
Copy link

Error: Could not find or load main class Py4JServer
Traceback (most recent call last):
File "bot.py", line 22, in
from nlg import NLG
File "C:\Users\sid_g\MagicMirror\AI-Smart-Mirror\nlg.py", line 7, in
gateway = launch_py4j_server()
File "C:\Users\sid_g\MagicMirror\AI-Smart-Mirror\py4j_server_init_.py", line 34, in launch_py4j_server
_port = int(_pid.stdout.readline())
ValueError: invalid literal for int() with base 10: b''

@akshaybahadur21
Copy link
Owner

Have you followed the documentation for Mich Mich Magic Mirror installation? That is the base project.

@akshaybahadur21
Copy link
Owner

homebrew is not installed. @ghadisaurabh are you running windows

@ghadisaurabh
Copy link
Author

Yeah I am running windows....

@cowboysdude
Copy link
Contributor

Won't work on windows but then it's not working on Linux either...

@akshaybahadur21
Copy link
Owner

@ghadisaurabh - It;s definetely not going to work on windows.... You must use ubuntu

@akshaybahadur21
Copy link
Owner

@cowboysdude - have you followed the mick mich guide... make sure that the base module by mich mich is running correctly.....Try using ubuntu

@ghadisaurabh
Copy link
Author

Now I have installed ubuntu 16.04 but again I got same error:
siddheshghadi@siddheshghadi-Lenovo-B50-70:~/Smart_Mirror-master$ python bot.py
Traceback (most recent call last):
File "bot.py", line 22, in
from nlg import NLG
File "/home/siddheshghadi/Smart_Mirror-master/nlg.py", line 4, in
from py4j_server import launch_py4j_server
File "/home/siddheshghadi/Smart_Mirror-master/py4j_server/init.py", line 8, in
from py4j.java_gateway import JavaGateway, GatewayClient, java_import
ImportError: No module named py4j.java_gateway

@akshaybahadur21
Copy link
Owner

is brew and ruby installed on your device

@ghadisaurabh
Copy link
Author

Okk.. so I have seen raghavpatnecha/smartmirror repository.It looks similar to yours. i have installed ruby and linuxbrew. ruby is installed in home directory and brew is installed in smart_mirror-master directory then setup.sh is also run(using sudo bash ./setup.sh). after this i have activated the virual evironment(using source hhsmartmirror/bin/activate from HackerHouseYT/AI-Smart-Mirror) and then run python bot.py
but it gave me error like this:
siddheshghadi@siddheshghadi-Lenovo-B50-70:$ cd AI-Smart-Mirror
siddheshghadi@siddheshghadi-Lenovo-B50-70:
/AI-Smart-Mirror$ cd ..
siddheshghadi@siddheshghadi-Lenovo-B50-70:$ cd Smart_Mirror-master
siddheshghadi@siddheshghadi-Lenovo-B50-70:
/Smart_Mirror-master$ source hhsmartmirror/bin/activate
(hhsmartmirror) siddheshghadi@siddheshghadi-Lenovo-B50-70:/Smart_Mirror-master$ python bot.py
Traceback (most recent call last):
File "bot.py", line 13, in
from apiclient.discovery import build
ImportError: No module named apiclient.discovery
(hhsmartmirror) siddheshghadi@siddheshghadi-Lenovo-B50-70:
/Smart_Mirror-master$

as i have already installed apiclient ,it shows me this error..
so where should i installed ruby and brew like in which folder?

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