insidesherpa / JPMC-tech-task-2-PY3

29 stars 348 forks source link

Error: - NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8080/query?id=1'. On clicking Start Streaming Data #248

Open Kam149 opened 4 years ago

Kam149 commented 4 years ago

On clicking Start Streaming Data on Browser, I am getting following error: - NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8080/query?id=1'. ss1 ss2 ss3

I am using python 3.7.2 and windows 10.

Gujar-Shubham commented 4 years ago

same error encountered any solution?

harmankaur23 commented 4 years ago

I don't know if it would work for you, but I went to JPMC task1 folder and ran server3.py there instead, and npm start from the task 2 folder. Weird but worked:)

hitarth221 commented 4 years ago

Same error... I tried changing the ports from 8080 to 8085 in the server3.py and datastreamer.ts codes.

Python version 3.8.1, and OS windows Any suggestions would be great.

Kam149 commented 4 years ago

I got a solution to this problem. I ran python datafeed/server3.py in one cmd(run it as administrator) and in another I ram npm start, so thus, I didn't get this error again.

hitarth221 commented 4 years ago

Yes, I've been doing that too... Is the server cmd (The one in the admin mode) supposed to show any output though? Because it shows me an error to the command : "python datafeed/server3.py" error msg: {Traceback (most recent call last): File "datafeed/server3.py", line 26, in import dateutil.parser ImportError: No module named dateutil.parser}

But when I run the command : "python3 datafeed/server3.py" it doesn't show anything.

Kam149 commented 4 years ago

see you need to now install dateutil via pip install python-dateutil. This can be only done if you have pip. If pip is not installed then install pip first then go for dateutil.

On Mon, 25 May 2020 at 12:50, hitarth221 notifications@github.com wrote:

Yes, I've been doing that too... Is the server cmd (The one in the admin mode) supposed to show any output though? Because it shows me an error to the command : "python datafeed/server3.py" error msg: {Traceback (most recent call last): File "datafeed/server3.py", line 26, in import dateutil.parser ImportError: No module named dateutil.parser}

But when I run the command : "python3 datafeed/server3.py" it doesn't show anything.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/insidesherpa/JPMC-tech-task-2-PY3/issues/248#issuecomment-633420288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI6B53FAF3Y3JIXIACSXCULRTIL2VANCNFSM4NEY6VIQ .

-- St. Marian

hitarth221 commented 4 years ago

@Kam149, Thankks for replying!!! Actually I've installed those too... Then I even tried to manually copy and paste the dateutil folers inside datafeed. Still didn't work. If I execute : python3 datafeed/server3 - it gives no error in the terminal ( however the "Network error failed to execute send" shows on the browser) but with : python datafeed/server3 - it gives this error now: {Traceback (most recent call last): File "datafeed/server3.py", line 26, in import dateutil.parser File "C:\Users\menon\JPMC-tech-task-2-PY3\datafeed\dateutil\parser__init__.py", line 2, in from ._parser import parse, parser, parserinfo, ParserError File "C:\Users\menon\JPMC-tech-task-2-PY3\datafeed\dateutil\parser_parser.py", line 42, in import six ImportError: No module named six}

Kam149 commented 4 years ago

Python3 is not going to work because this command does not work on Windows. You have to try with python command only. Now the error is in this file of date util which you copied in datafeed. So I think you should delete this file and then again try: - pip3 install python-dateutil. (If earlier you didn't try installing with pip3). Else you can delete whole of the folder and repeat those steps. Because I think that some of your file corrupted.

hitarth221 commented 4 years ago

Oh Okay... I'll try that. Thanks a lot @Kam149

destifo commented 2 years ago

I forgot to start the server3.py file in another error mess and run npm start. I'm just saying don't forget to run server.py in parallel before you execute npm start or it won't work

nadim365 commented 2 years ago

I got a solution to this problem. I ran python datafeed/server3.py in one cmd(run it as administrator) and in another I ram npm start, so thus, I didn't get this error again.

this finally worked !! Thanks for the solution

souromisen commented 2 years ago

I got a solution to this problem. I ran python datafeed/server3.py in one cmd(run it as administrator) and in another I ram npm start, so thus, I didn't get this error again.

this finally worked !! Thanks for the solution

this is what I'm doing, but it still doesnt seem to be working for me! any suggestions?