jpmc-tech-task-1-py3's People
Forkers
zoluu toluakin bailey-boop tonyguo0 tomoschuck xasno collins33 stefanosu hamidurrahman1 michelkazi alex-png rinju99 kjain0073 luckyiitr caitlinpadua sebastiandelima maramsumanth brianw921 shenoyv paragpachpute panwalas haardikdharma10 landryirakoze kartikraj imgolash himanshu0404 priyanshps tejasamle shruti01052002 sarthakkathuria anubansal17 prabalgupta12 vsujeesh atharvakokatee masters-akt shubhamb99 manasyadav1070 trumanhung gouravsingh2580 mohan6677 codespaint pranatishete abhinavkumargoswami rishabhpurohit sampurn-anand niksm7 skup-sci kanchanbhale bbdprasad parikshitghosh3 chandnikoel plashaa rksensational parthsarthiprasad pauladugyamfi jaswantcoder kumarishivanisingh14 shiva-jyothi shreeya59 dhruvsha256 ritvikraj27 johnduongoc pratikghose vaishnavichoudhary0011 muskanjindal25 hansika716 oclark23 briansjkim me-shah-meet nicoivazquez nishant1308 iathmika prakharindoria beneadeniran barbarajohnsonatx wnam98 dollyupmandewan ishika-a swapnilshukl prathamshroff iamlovelesh raghuwendr theprincechugh ritishtiwari kakolipal528 nancy224 tushargupta00 marianatalie mrdarkk rishabh9260 advaitmarathe iftaqar sauravjaiswalsj robertvictoreen mnandana kumarikhushboo1607 ajitesh13 ankitha183 tpmsh-git abhi6299jpmc-tech-task-1-py3's Issues
Wrong data value in client_test.py
In the test_getDataPoint_calculatePriceBidGreaterThanAsk method of client_test.py, for the second quote, bid_price=117.87 and ask_price=121.68, but according to the method bid_price should be > ask_price, here reverse is happening.
missing module request in client3.py
Error in python3 client3.py
A huge exception occured on running client3.py
This issue occured when i was setting up environment to do tasks (task 1).
Help me to fix it. I am a beginner.
C:\Users\Shivani>cd JPMC-tech-task-1-py3
C:\Users\Shivani\JPMC-tech-task-1-py3>python client3.py
Traceback (most recent call last):
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 1319, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1004, in _send_output
self.send(msg)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 944, in send
self.connect()
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 915, in connect
self.sock = self._create_connection(
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\socket.py", line 808, in create_connection
raise err
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "client3.py", line 52, in
quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read())
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 1348, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "C:\Users\Shivani\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 1322, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it>
Both the server3.py and client3.py files are not running.
Server3.py file not running properly
When I tried running server3.py, the phrase "HTTP server started on port 8080" was the only thing that showed up. Nothing else happened after an hour so I tried the suggested workarounds in the troubleshooting guidelines (i.e. removed the firewall and changed port to 8085) but the same thing is showing up. I've attached a couple screenshots of Terminal.
TypeError: the JSON object must be str, not 'bytes'
Cannot start client.py
Facing an error while executing git commit -m 'Create Patch File'
error: pathspec 'Patch' did not match any file(s) known to git.
error: pathspec 'File'' did not match any file(s) known to git.
ModuleNotFoundError: No module named 'dateutil' in server3.py file
Server is not running
This what Isee when I type python server3.py
Traceback (most recent call last):
File "server3.py", line 320, in
run(App())
File "server3.py", line 214, in run
server = ThreadedHTTPServer((host, port), RequestHandler)
File "/home/bideen/anaconda3/lib/python3.7/socketserver.py", line 452, in init
self.server_bind()
File "/home/bideen/anaconda3/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/home/bideen/anaconda3/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
TypeError: a bytes-like object is required, not 'str'
Getting this issue while running python server3.py
Traceback (most recent call last):
File "f:/JP Morgan Chase/JPMC-tech-task-1-py3/server3.py", line 319, in <module>
generate_csv()
File "f:/JP Morgan Chase/JPMC-tech-task-1-py3/server3.py", line 151, in generate_csv
writer.writerow([t, stock, side, order, size])
TypeError: a bytes-like object is required, not 'str'
client3.py NameError: name 'prices' is not defined
HTTP Error 401: Unauthorized
Each Time I run my Server-Side Code with Admin CMD, This shows up-
Traceback (most recent call last):
File "client3.py", line 52, in
quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read())
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "D:\Program Files\Anaconda\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
issue in running terminal as administrator
NameError: Prices is not defined
I followed the instructions precisely and I got a name error that prices is not defined
File "client3.py", line 60, in <module>
print ("Ratio %s" % (getRatio(prices['ABC'], prices['DEF'])))
NameError: name 'prices' is not defined```
Can't open server.py and client.py
ModuleNotFoundError: No module named 'dateutil'
I have installed this package using python3 successfully. After trying to run the server on python3 again, I'm still getting error that states "No module named 'dateutil'"
Not running
Port already in USE error
I have python 3.6.x version installed.
When I am executing python server3.py command in the path /JPMC-tech-task-1-py3$ I am getting below error even after killing currently running process several times:
OSError: [Errno 98] Address already in use
No module named 'urllib2' error
I am using python 3.6.0
getting error," No module named 'urllib2' "
'float' object is not subscriptable
Dear Supervisor,
when I execute the patch file ’python client3. py‘ which has been modified in accordance with the guide,it shows that Type Error :'float' object is not subscript-able at line 46. The Type Error is in the module "print ("Ratio %s" % getRatio(price['DEF'], price['ABC']))".
Thank you for your kind help.
Best Regards,
RD
Issue with Python client3.py
python3 server.py
My issue is that the server.py is running successfully but I don't think the HTTP server started.
Link for the screenshot is given below. Please do clarify my doubt.
(https://user-images.githubusercontent.com/64896383/81182415-60991680-8fcb-11ea-80f6-09ac1f2a4027.png)
Issue running python3.py on Windows
Should be client3 instead of client
JPMC-tech-task-1-PY3/client_test.py
Line 2 in 5d3a2a3
Error in server3.py
File "C:\Users\tikam suvasiyA\jpmorgan\JPMC-tech-task-1-py3\server3.py", line 26, in
import dateutil.parser
File "C:\Users\watson\DJANgo~1\env\lib\site-packages\dateutil\parser.py", line 158
l.append("%s=%s" % (attr, value
))
^
SyntaxError: invalid syntax
BlockingIOError: [Errno 11] when running client3.py
No query received when running server in Windows
Only shows the HTTP server started on port but no response
dateutil installation problem
I tried going through the dependency troubleshooting slides but to no avail.
Here are my steps:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Then, I do
python3 get-pip.py
Finally, I run
pip3 install python-dateutil
But after I try
python3 server3.py
I still get the same error message. I've tried reinstalling and installing pip but nothing has worked. Thanks in advance for your help.
help!!!
Issues with python server3.py
I installed python 3, and was able to run all the commands signed in as an administrator. I also was able to successfully install pip and its dependencies because when running the python server command i was getting the dateutil error. I followed how to install pip, and now i see what version I have but when I run the server3 command i get the below error
Missing requirements.txt
I think it would be a good idea to add a requirements.txt file for easy setup
These are the requirements I think are necessary
python-dateutil==2.8.1
six==1.14.0
Server not starting
After moving to Desktop\JPMC-tech-task-1-py3> when I use python3 server3.py nothing happens it just move to the next line which is same as of the previous Desktop\JPMC-tech-task-1-py3>
.Now what to do am stuck?
OS Error for "python server3.py"
i'm getting error in the server3.py
File "C:\Users\tikam suvasiyA\jpmorgan\JPMC-tech-task-1-py3\server3.py", line 26, in
import dateutil.parser
File "C:\Users\watson\DJANgo~1\env\lib\site-packages\dateutil\parser.py", line 158
l.append("%s=%s" % (attr, value
))
^
SyntaxError: invalid syntax
problem in patching in cmd .
JPMC-tech-task-1-py3>git commit -m 'Create Patch File"
error: pathspec 'Patch' did not match any file(s) known to git
error: pathspec 'File' did not match any file(s) known to git
When I try rendering the page after all of the changes I am getting this issue
/Users/juliareichel/Desktop/JPMC-tech-task-3-PY3/src/Graph.tsx
Type error: Cannot find module '@jpmorganchase/perspective'. TS2307
I tried following the fixes with downloading node_modules etc but this is still happening
Server side working but client side showing issue
Can Anyone help me to fix it?
Server3.py & Client3.py not working
code is not working IDK why
@srgarcess https://www.python.org/downloads/release/python-380/
@srgarcess https://www.python.org/downloads/release/python-380/
Let me know if it's all good after you finish fixing your Python version
Originally posted by @jbf-insidesherpa in #2 (comment)
unknown issue with setting up development environment
Exception happened during processing of request from ('127.0.0.1', 63786)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 599, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 655, in init
self.handle()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server3.py", line 213, in do_GET
get(self, routes)
File "server3.py", line 202, in get
req_handler.wfile.write(bytes(data, encoding = 'utf-8'))
TypeError: str() takes at most 1 argument (2 given)
Error running client3.py
Server not running/ client:HTTP Error
urlopen error [WinError 10061]
Hi, when I try to run the client3.py script from the cmd line (as admin), I get the error:
urllib.error.URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it>
Issue with Client3.py server
InsideSherpa>JPMC-tech-task-1py3 on Windows 10
I am trying to install the dependencies for Windows 10, and I have accomplished the following task successfully assuming that the Command Prompt is running as an Administrator:
-
git clone https://github.com/insidesherpa/JPMC-tech-task-1-py3.git
-
python --version is Python 3.4.0
-
python3 get-pip.py
-
To install the dateutil I had to do: python -m pip install python-dateutil
-
Then the error comes when I ran the client as an administrator: python client3.py
Looks like I'm connected to the server because it is receiving queries, but I'm not sure If I'm done with the whole process, Can anyone help me please?
No response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.