akshaybahadur21 / Smart_Mirror

MIT License
26 stars 15 forks source link

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

Open ghadisaurabh opened 6 years ago

ghadisaurabh commented 6 years ago

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 commented 6 years ago

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

akshaybahadur21 commented 6 years ago

homebrew is not installed. @ghadisaurabh are you running windows

ghadisaurabh commented 6 years ago

Yeah I am running windows....

cowboysdude commented 6 years ago

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

akshaybahadur21 commented 6 years ago

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

akshaybahadur21 commented 6 years ago

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

ghadisaurabh commented 6 years ago

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 commented 6 years ago

is brew and ruby installed on your device

ghadisaurabh commented 6 years ago

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?