insidesherpa / JPMC-tech-task-1-PY3

50 stars 447 forks source link

python: can't open file 'server.py': [Errno 2] No such file or directory #153

Open othersbet opened 4 years ago

othersbet commented 4 years ago

I cloned the repository but still cannot open the file

apurvadey commented 4 years ago

@othersbet Try this: python server3.py or python3 server3.py Worked for me

othersbet commented 4 years ago

@apurvadey This worked but I got another error this time. No issues in server side but I get errors in client side- "No connection could be made because the target machine actively refused it." Do you know how to solve this? Thanks!

apurvadey commented 4 years ago

@othersbet Yes, just restart the server terminal and start the server again with the above command. And then, in the client terminal, give your command. This worked for me, hope it helps.

othersbet commented 4 years ago

@apurvadey Unfortunately, I am still getting the same error. I did everything as told in the pdf but it still won't work.

apurvadey commented 4 years ago

@othersbet Can you share any screenshot of both the terminals after starting afresh?

othersbet commented 4 years ago

@apurvadey Server Client

apurvadey commented 4 years ago

@othersbet Okay, got you! You need to change the port 8080 to 8085 in server3.py and client3.py (if you are using server.py or client.py, the solution will be the same). change the port 8080 to 8085 where ever you encounter that in the whole file. and then try again.

othersbet commented 4 years ago

@apurvadey Did that but still same error :(

apurvadey commented 4 years ago

@othersbet Please ensure that you run the server before the client. This is the most apt reason why a ConnectionRefusedError is occuring. You can refer this thread

poojasn-github commented 4 years ago

I cloned the repository but still cannot open the file client side is working but server side is not

manuelkwizera commented 4 years ago

Is this a proper output i'm supposed to get after typing python server3.py

git

apurvadey commented 4 years ago

@KwizeraEmmanuel Yes, it is valid. This means it is successfully communicating with client side, hence receiving queries.

apurvadey commented 4 years ago

@poojasn-github Can you please elaborate?