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

想請問關於 無法連線至 mis.tse.com.tw #27

Open
louwang opened this issue Feb 24, 2016 · 2 comments
Open

想請問關於 無法連線至 mis.tse.com.tw #27

louwang opened this issue Feb 24, 2016 · 2 comments
Labels

Comments

@louwang
Copy link

louwang commented Feb 24, 2016

Traceback (most recent call last):
File "realtime2.py", line 235, in
realtime_data = RealtimeTWSE(1201)
File "realtime2.py", line 132, in init
super(RealtimeTWSE, self).init(no, date)
File "realtime2.py", line 35, in init
self.result = URL.request('GET', STOCKPATH % params)
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 69, in request
*_urlopen_kw)
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 90, in request_encode_url
return self.urlopen(method, url, *_extra_kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 652, in urlopen
release_conn=release_conn, **response_kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 529, in urlopen
raise HostChangedError(self, url, retries)
urllib3.exceptions.HostChangedError: HTTPConnectionPool(host='mis.tse.com.tw', port=None): Tried to open a foreign host with url: http://1.1.1.2

@nelsonchung
Copy link

我也有這種問題

Traceback (most recent call last):
File "get_grs.py", line 3, in
realtime_stock = RealtimeOTC('8446')
File "/usr/local/lib/python2.7/dist-packages/grs/realtime2.py", line 146, in init
super(RealtimeOTC, self).init(no, date)
File "/usr/local/lib/python2.7/dist-packages/grs/realtime2.py", line 35, in init
self.result = URL.request('GET', STOCKPATH % params)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 75, in request
*_urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 88, in request_encode_url
return self.urlopen(method, url, *_urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
release_conn=release_conn, *_response_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 551, in urlopen
raise HostChangedError(self, url, retries - 1)
urllib3.exceptions.HostChangedError: HTTPConnectionPool(host='mis.tse.com.tw', port=None): Tried to open a foreign host with url: http://1.1.1.2
nelson@cbn-Veriton-M265:~/git/Python_Teach/get_stock_information$ python get_grs.py
Traceback (most recent call last):
File "get_grs.py", line 3, in
realtime_stock = RealtimeOTC('8446')
File "/usr/local/lib/python2.7/dist-packages/grs/realtime2.py", line 146, in init
super(RealtimeOTC, self).init(no, date)
File "/usr/local/lib/python2.7/dist-packages/grs/realtime2.py", line 35, in init
self.result = URL.request('GET', STOCKPATH % params)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 75, in request
*_urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 88, in request_encode_url
return self.urlopen(method, url, *_urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
release_conn=release_conn, *_response_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 551, in urlopen
raise HostChangedError(self, url, retries - 1)
urllib3.exceptions.HostChangedError: HTTPConnectionPool(host='mis.tse.com.tw', port=None): Tried to open a foreign host with url: http://1.1.1.2

Source code
`
from grs import RealtimeOTC

realtime_stock = RealtimeOTC('8446')
realtime_stock.raw
realtime_stock.data
`

@EricZLu
Copy link

EricZLu commented May 25, 2016

I met the same problem when I used the realtimeTWSE.
The error information is as below:

File "/Library/Python/2.7/site-packages/grs-0.6.2-py2.7.egg/grs/realtime2.py", line 132, in init
super(RealtimeTWSE, self).init(no, date)
File "/Library/Python/2.7/site-packages/grs-0.6.2-py2.7.egg/grs/realtime2.py", line 35, in init
self.result = URL.request('GET', STOCKPATH % params)
File "build/bdist.macosx-10.11-intel/egg/urllib3/request.py", line 69, in request
File "build/bdist.macosx-10.11-intel/egg/urllib3/request.py", line 90, in request_encode_url
File "build/bdist.macosx-10.11-intel/egg/urllib3/connectionpool.py", line 675, in urlopen
File "build/bdist.macosx-10.11-intel/egg/urllib3/connectionpool.py", line 544, in urlopen
urllib3.exceptions.HostChangedError: HTTPConnectionPool(host='mis.tse.com.tw', port=80): Tried to open a foreign host with url: http://1.1.1.2

Does anyone know what's going on with it?

@toomore toomore added the bug label Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants