vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 3
声望: 0

运行 vnpy 文件夹下的 fxcm包 中的 test.py 测试 福汇接口的 连接 出错

E:\ProgramData\VNConda\python.exe G:/Python/vnpy-1.9.2-LTS/vnpy/api/fxcm/test.py
api created

Traceback (most recent call last):
File "G:/Python/vnpy-1.9.2-LTS/vnpy/api/fxcm/test.py", line 28, in <module>
api.subscribeModel('Summary')
File "G:\Python\vnpy-1.9.2-LTS\vnpy\api\fxcm\vnfxcm.py", line 206, in subscribeModel
self.sio.on(model, self.processModelUpdate)
AttributeError: 'NoneType' object has no attribute 'on'
Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\ProgramData\VNConda\lib\threading.py", line 801, in bootstrap_inner
self.run()
File "E:\ProgramData\VNConda\lib\threading.py", line 754, in run
self.
target(*self.args, **self.kwargs)
File "G:\Python\vnpy-1.9.2-LTS\vnpy\api\fxcm\vnfxcm.py", line 109, in runReq
self.processReq(d)
File "G:\Python\vnpy-1.9.2-LTS\vnpy\api\fxcm\vnfxcm.py", line 156, in processReq
resp = requests.post(url, headers=self.headers, data=params, proxies=proxy)
File "E:\ProgramData\VNConda\lib\site-packages\requests\api.py", line 116, in post
return request('post', url, data=data, json=json, kwargs)
File "E:\ProgramData\VNConda\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url,
kwargs)
File "E:\ProgramData\VNConda\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, send_kwargs)
File "E:\ProgramData\VNConda\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request,
kwargs)
File "E:\ProgramData\VNConda\lib\site-packages\requests\adapters.py", line 510, in send
raise ProxyError(e, request=request)
ProxyError: HTTPSConnectionPool(host='api-demo.fxcm.com', port=443): Max retries exceeded with url: /trading/subscribe (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x050737D0>: Failed to establish a new connection: [Errno 10061] ',)))

Administrator
avatar
加入于:
帖子: 1929
声望: 87

这是GFW导致的,请在香港阿里云尝试把

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3